You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
CONSOLE MESSAGE: This requires a TrustedScriptURL value else it violates the following Content Security Policy directive: "require-trusted-types-for 'script'"
2
+
CONSOLE MESSAGE: This requires a TrustedScriptURL value else it violates the following Content Security Policy directive: "require-trusted-types-for 'script'"
3
+
CONSOLE MESSAGE: This requires a TrustedScriptURL value else it violates the following Content Security Policy directive: "require-trusted-types-for 'script'"
4
+
CONSOLE MESSAGE: This requires a TrustedScriptURL value else it violates the following Content Security Policy directive: "require-trusted-types-for 'script'"
5
+
CONSOLE MESSAGE: This requires a TrustedHTML value else it violates the following Content Security Policy directive: "require-trusted-types-for 'script'"
6
+
CONSOLE MESSAGE: This requires a TrustedHTML value else it violates the following Content Security Policy directive: "require-trusted-types-for 'script'"
7
+
CONSOLE MESSAGE: This requires a TrustedScriptURL value else it violates the following Content Security Policy directive: "require-trusted-types-for 'script'"
8
+
CONSOLE MESSAGE: This requires a TrustedScriptURL value else it violates the following Content Security Policy directive: "require-trusted-types-for 'script'"
1
9
2
10
3
11
4
-
FAIL setAttribute and setAttributeNode respect the element's node document's global's CSP;
5
-
Element=iframe; Parent=div; Attribute=srcdoc assert_throws_js: function "() => {
6
-
sourceElement.setAttributeNode(sourceAttr);
7
-
}" did not throw
8
-
FAIL setAttribute and setAttributeNode respect the element's node document's global's CSP;
9
-
Element=script; Parent=div; Attribute=src assert_throws_js: function "() => {
10
-
sourceElement.setAttributeNode(sourceAttr);
11
-
}" did not throw
12
-
FAIL setAttribute and setAttributeNode respect the element's node document's global's CSP;
13
-
Element=script; Parent=svg; Attribute=href assert_throws_js: function "() => {
14
-
sourceElement.setAttributeNode(sourceAttr);
15
-
}" did not throw
16
-
FAIL setAttribute and setAttributeNode respect the element's node document's global's CSP;
17
-
Element=script; Parent=svg; Attribute=xlink:href assert_throws_js: function "() => {
18
-
sourceElement.setAttributeNode(sourceAttr);
19
-
}" did not throw
12
+
PASS setAttribute and setAttributeNode respect the element's node document's global's CSP;
13
+
Element=iframe; Parent=div; Attribute=srcdoc
14
+
PASS setAttribute and setAttributeNode respect the element's node document's global's CSP;
15
+
Element=script; Parent=div; Attribute=src
16
+
PASS setAttribute and setAttributeNode respect the element's node document's global's CSP;
17
+
Element=script; Parent=svg; Attribute=href
18
+
PASS setAttribute and setAttributeNode respect the element's node document's global's CSP;
CONSOLE MESSAGE: This requires a TrustedScript value else it violates the following Content Security Policy directive: "require-trusted-types-for 'script'"
2
+
CONSOLE MESSAGE: This requires a TrustedScript value else it violates the following Content Security Policy directive: "require-trusted-types-for 'script'"
1
3
2
4
PASS a.setAttribte('onclick') sets a trusted script.
Copy file name to clipboardExpand all lines: LayoutTests/imported/w3c/web-platform-tests/trusted-types/TrustedTypePolicyFactory-metadata.tentative-expected.txt
+24-12Lines changed: 24 additions & 12 deletions
Original file line number
Diff line number
Diff line change
@@ -1,3 +1,15 @@
1
+
CONSOLE MESSAGE: This requires a TrustedScript value else it violates the following Content Security Policy directive: "require-trusted-types-for 'script'"
2
+
CONSOLE MESSAGE: This requires a TrustedScript value else it violates the following Content Security Policy directive: "require-trusted-types-for 'script'"
3
+
CONSOLE MESSAGE: This requires a TrustedScript value else it violates the following Content Security Policy directive: "require-trusted-types-for 'script'"
4
+
CONSOLE MESSAGE: This requires a TrustedScript value else it violates the following Content Security Policy directive: "require-trusted-types-for 'script'"
5
+
CONSOLE MESSAGE: This requires a TrustedScript value else it violates the following Content Security Policy directive: "require-trusted-types-for 'script'"
6
+
CONSOLE MESSAGE: This requires a TrustedScript value else it violates the following Content Security Policy directive: "require-trusted-types-for 'script'"
7
+
CONSOLE MESSAGE: This requires a TrustedScript value else it violates the following Content Security Policy directive: "require-trusted-types-for 'script'"
8
+
CONSOLE MESSAGE: This requires a TrustedScript value else it violates the following Content Security Policy directive: "require-trusted-types-for 'script'"
9
+
CONSOLE MESSAGE: This requires a TrustedScript value else it violates the following Content Security Policy directive: "require-trusted-types-for 'script'"
10
+
CONSOLE MESSAGE: This requires a TrustedScript value else it violates the following Content Security Policy directive: "require-trusted-types-for 'script'"
11
+
CONSOLE MESSAGE: This requires a TrustedScript value else it violates the following Content Security Policy directive: "require-trusted-types-for 'script'"
12
+
CONSOLE MESSAGE: This requires a TrustedScript value else it violates the following Content Security Policy directive: "require-trusted-types-for 'script'"
1
13
2
14
PASS Test assignment of string on madeup.madeup
3
15
PASS Test assignment of string on madeup.setAttribute(madeup,..)
@@ -16,21 +28,21 @@ PASS Test assignment of TrustedScript on madeup.setAttribute(id,..)
16
28
PASS Test assignment of TrustedScriptURL on madeup.id
17
29
PASS Test assignment of TrustedScriptURL on madeup.setAttribute(id,..)
18
30
PASS Test assignment of string on madeup.onerror
19
-
FAIL Test assignment of string on madeup.setAttribute(onerror,..) assert_throws_js: throws function "_ => { element.setAttribute(property, value); }" did not throw
31
+
PASS Test assignment of string on madeup.setAttribute(onerror,..)
20
32
PASS Test assignment of TrustedHTML on madeup.onerror
21
-
FAIL Test assignment of TrustedHTML on madeup.setAttribute(onerror,..) assert_throws_js: throws function "_ => { element.setAttribute(property, value); }" did not throw
33
+
PASS Test assignment of TrustedHTML on madeup.setAttribute(onerror,..)
22
34
PASS Test assignment of TrustedScript on madeup.onerror
23
35
PASS Test assignment of TrustedScript on madeup.setAttribute(onerror,..)
24
36
PASS Test assignment of TrustedScriptURL on madeup.onerror
25
-
FAIL Test assignment of TrustedScriptURL on madeup.setAttribute(onerror,..) assert_throws_js: throws function "_ => { element.setAttribute(property, value); }" did not throw
37
+
PASS Test assignment of TrustedScriptURL on madeup.setAttribute(onerror,..)
26
38
PASS Test assignment of string on madeup.onclick
27
-
FAIL Test assignment of string on madeup.setAttribute(onclick,..) assert_throws_js: throws function "_ => { element.setAttribute(property, value); }" did not throw
39
+
PASS Test assignment of string on madeup.setAttribute(onclick,..)
28
40
PASS Test assignment of TrustedHTML on madeup.onclick
29
-
FAIL Test assignment of TrustedHTML on madeup.setAttribute(onclick,..) assert_throws_js: throws function "_ => { element.setAttribute(property, value); }" did not throw
41
+
PASS Test assignment of TrustedHTML on madeup.setAttribute(onclick,..)
30
42
PASS Test assignment of TrustedScript on madeup.onclick
31
43
PASS Test assignment of TrustedScript on madeup.setAttribute(onclick,..)
32
44
PASS Test assignment of TrustedScriptURL on madeup.onclick
33
-
FAIL Test assignment of TrustedScriptURL on madeup.setAttribute(onclick,..) assert_throws_js: throws function "_ => { element.setAttribute(property, value); }" did not throw
45
+
PASS Test assignment of TrustedScriptURL on madeup.setAttribute(onclick,..)
34
46
PASS Test assignment of string on b.madeup
35
47
PASS Test assignment of string on b.setAttribute(madeup,..)
36
48
PASS Test assignment of TrustedHTML on b.madeup
@@ -48,19 +60,19 @@ PASS Test assignment of TrustedScript on b.setAttribute(id,..)
48
60
PASS Test assignment of TrustedScriptURL on b.id
49
61
PASS Test assignment of TrustedScriptURL on b.setAttribute(id,..)
50
62
PASS Test assignment of string on b.onerror
51
-
FAIL Test assignment of string on b.setAttribute(onerror,..) assert_throws_js: throws function "_ => { element.setAttribute(property, value); }" did not throw
63
+
PASS Test assignment of string on b.setAttribute(onerror,..)
52
64
PASS Test assignment of TrustedHTML on b.onerror
53
-
FAIL Test assignment of TrustedHTML on b.setAttribute(onerror,..) assert_throws_js: throws function "_ => { element.setAttribute(property, value); }" did not throw
65
+
PASS Test assignment of TrustedHTML on b.setAttribute(onerror,..)
54
66
PASS Test assignment of TrustedScript on b.onerror
55
67
PASS Test assignment of TrustedScript on b.setAttribute(onerror,..)
56
68
PASS Test assignment of TrustedScriptURL on b.onerror
57
-
FAIL Test assignment of TrustedScriptURL on b.setAttribute(onerror,..) assert_throws_js: throws function "_ => { element.setAttribute(property, value); }" did not throw
69
+
PASS Test assignment of TrustedScriptURL on b.setAttribute(onerror,..)
58
70
PASS Test assignment of string on b.onclick
59
-
FAIL Test assignment of string on b.setAttribute(onclick,..) assert_throws_js: throws function "_ => { element.setAttribute(property, value); }" did not throw
71
+
PASS Test assignment of string on b.setAttribute(onclick,..)
60
72
PASS Test assignment of TrustedHTML on b.onclick
61
-
FAIL Test assignment of TrustedHTML on b.setAttribute(onclick,..) assert_throws_js: throws function "_ => { element.setAttribute(property, value); }" did not throw
73
+
PASS Test assignment of TrustedHTML on b.setAttribute(onclick,..)
62
74
PASS Test assignment of TrustedScript on b.onclick
63
75
PASS Test assignment of TrustedScript on b.setAttribute(onclick,..)
64
76
PASS Test assignment of TrustedScriptURL on b.onclick
65
-
FAIL Test assignment of TrustedScriptURL on b.setAttribute(onclick,..) assert_throws_js: throws function "_ => { element.setAttribute(property, value); }" did not throw
77
+
PASS Test assignment of TrustedScriptURL on b.setAttribute(onclick,..)
CONSOLE MESSAGE: This requires a TrustedScriptURL value else it violates the following Content Security Policy directive: "require-trusted-types-for 'script'"
2
+
CONSOLE MESSAGE: This requires a TrustedScriptURL value else it violates the following Content Security Policy directive: "require-trusted-types-for 'script'"
3
+
CONSOLE MESSAGE: This requires a TrustedScriptURL value else it violates the following Content Security Policy directive: "require-trusted-types-for 'script'"
4
+
CONSOLE MESSAGE: This requires a TrustedHTML value else it violates the following Content Security Policy directive: "require-trusted-types-for 'script'"
5
+
CONSOLE MESSAGE: This requires a TrustedHTML value else it violates the following Content Security Policy directive: "require-trusted-types-for 'script'"
6
+
CONSOLE MESSAGE: This requires a TrustedHTML value else it violates the following Content Security Policy directive: "require-trusted-types-for 'script'"
7
+
CONSOLE MESSAGE: This requires a TrustedScript value else it violates the following Content Security Policy directive: "require-trusted-types-for 'script'"
8
+
CONSOLE MESSAGE: This requires a TrustedScript value else it violates the following Content Security Policy directive: "require-trusted-types-for 'script'"
9
+
CONSOLE MESSAGE: This requires a TrustedScriptURL value else it violates the following Content Security Policy directive: "require-trusted-types-for 'script'"
1
10
2
-
FAIL script.src accepts only TrustedScriptURL assert_throws_js: function "_ => {
3
-
elem.setAttribute(attribute, value);
4
-
}" did not throw
5
-
FAIL iframe.srcdoc accepts only TrustedHTML assert_throws_js: function "_ => {
6
-
elem.setAttribute(attribute, value);
7
-
}" did not throw
8
-
FAIL div.onclick accepts only TrustedScript assert_throws_js: function "_ => {
9
-
elem.setAttribute(attribute, value);
10
-
}" did not throw
11
-
FAIL `Script.prototype.setAttribute.SrC = string` throws. assert_throws_js: function "_ => {
PASS script.src accepts string and null after default policy was created.
15
-
FAIL script.src's mutationobservers receive the default policy's value. assert_equals: expected "http://this.is.a.successful.test/" but got "http://this.is.a.scripturl.test/"
16
-
FAIL iframe.srcdoc's mutationobservers receive the default policy's value. assert_equals: expected "Quack, I want to be a duck!" but got "Hi, I want to be transformed!"
17
-
FAIL div.onclick's mutationobservers receive the default policy's value. assert_equals: expected "Meow, I want to be a cat!" but got "Hi, I want to be transformed!"
16
+
PASS script.src's mutationobservers receive the default policy's value.
17
+
PASS iframe.srcdoc's mutationobservers receive the default policy's value.
18
+
PASS div.onclick's mutationobservers receive the default policy's value.
18
19
PASS iframe.srcdoc accepts string and null after default policy was created.
19
-
FAIL div.onclick accepts string and null after default policy was created. assert_equals: expected "Meow, I want to be a cat!" but got "Hi, I want to be transformed!"
20
+
PASS div.onclick accepts string and null after default policy was created.
20
21
PASS a.rel accepts strings
21
22
PASS a.rel accepts null
22
-
FAIL `script.src = setAttributeNode(embed.src)` with string works. assert_equals: expected "http://this.is.a.successful.test/" but got "http://this.is.a.scripturl.test/"
23
+
PASS `script.src = setAttributeNode(embed.src)` with string works.
Copy file name to clipboardExpand all lines: LayoutTests/imported/w3c/web-platform-tests/trusted-types/block-string-assignment-to-Element-setAttributeNS-expected.txt
+5-3Lines changed: 5 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -1,13 +1,15 @@
1
+
CONSOLE MESSAGE: This requires a TrustedScriptURL value else it violates the following Content Security Policy directive: "require-trusted-types-for 'script'"
2
+
CONSOLE MESSAGE: This requires a TrustedScriptURL value else it violates the following Content Security Policy directive: "require-trusted-types-for 'script'"
3
+
CONSOLE MESSAGE: This requires a TrustedScriptURL value else it violates the following Content Security Policy directive: "require-trusted-types-for 'script'"
4
+
CONSOLE MESSAGE: This requires a TrustedScriptURL value else it violates the following Content Security Policy directive: "require-trusted-types-for 'script'"
1
5
2
6
PASS Element.setAttributeNS assigned via policy (successful HTML transformation)
3
7
PASS Element.setAttributeNS assigned via policy (successful Script transformation)
4
8
PASS Element.setAttributeNS assigned via policy (successful ScriptURL transformation)
5
9
PASS Element.setAttributeNS accepts untrusted string for non-specced accessor
6
10
PASS Element.setAttributeNS accepts null for non-specced accessor
7
11
PASS Assigning TrustedScriptURL to <svg:script xlink:href=...> works
8
-
FAIL Blocking non-TrustedScriptURL assignment to <svg:script xlink:href=...> works assert_throws_js: function "_ => {
9
-
elem.setAttributeNS(xlinkNamespace, "href", v);
10
-
}" did not throw
12
+
PASS Blocking non-TrustedScriptURL assignment to <svg:script xlink:href=...> works
11
13
PASS Check `setAttributeNS` allows setting non-trusted string for non-lowercase attribute "SRCDOC" (ns=null) for "iframe" element (ns=http://www.w3.org/1999/xhtml).
12
14
PASS Check `setAttributeNS` allows setting non-trusted string for non-lowercase attribute "SRC" (ns=null) for "script" element (ns=http://www.w3.org/1999/xhtml).
13
15
PASS Check `setAttributeNS` allows setting non-trusted string for non-lowercase attribute "HREF" (ns=null) for "script" element (ns=http://www.w3.org/2000/svg).
0 commit comments