Fail | setAttribute and setAttributeNode respect the element's node document's global's CSP;
Element=iframe; Parent=div; Attribute=srcdoc | assert_throws_js: function "() => {
sourceElement.setAttributeNode(sourceAttr);
}" threw object "TypeError: Failed to execute 'setAttributeNode' on 'Element': This document requires 'TrustedHTML' assignment." ("TypeError") expected instance of function "function TypeError() { [native code] }" ("TypeError") at Test.<anonymous> (https://not-wpt.live/trusted-types/Element-setAttribute-respects-Elements-node-documents-globals-CSP-after-adoption-from-non-TT-realm.html:114:17)
at Test.step (https://not-wpt.live/resources/testharness.js:2642:25)
at HTMLIFrameElement.<anonymous> (https://not-wpt.live/resources/testharness.js:2717:32) Asserts runFail | assert_throws_js(function "function TypeError() { [native code] }", function "() => { sourceElement.setAttributeNode(sourceAttr); }")
at Test.<anonymous> ( /trusted-types/Element-setAttribute-respects-Elements-node-documents-globals-CSP-after-adoption-from-non-TT-realm.html:114:17) |
|
Fail | setAttribute and setAttributeNode respect the element's node document's global's CSP;
Element=script; Parent=div; Attribute=src | assert_throws_js: function "() => {
sourceElement.setAttributeNode(sourceAttr);
}" threw object "TypeError: Failed to execute 'setAttributeNode' on 'Element': This document requires 'TrustedScriptURL' assignment." ("TypeError") expected instance of function "function TypeError() { [native code] }" ("TypeError") at Test.<anonymous> (https://not-wpt.live/trusted-types/Element-setAttribute-respects-Elements-node-documents-globals-CSP-after-adoption-from-non-TT-realm.html:114:17)
at Test.step (https://not-wpt.live/resources/testharness.js:2642:25)
at HTMLIFrameElement.<anonymous> (https://not-wpt.live/resources/testharness.js:2717:32) Asserts runFail | assert_throws_js(function "function TypeError() { [native code] }", function "() => { sourceElement.setAttributeNode(sourceAttr); }")
at Test.<anonymous> ( /trusted-types/Element-setAttribute-respects-Elements-node-documents-globals-CSP-after-adoption-from-non-TT-realm.html:114:17) |
|
Fail | setAttribute and setAttributeNode respect the element's node document's global's CSP;
Element=script; Parent=svg; Attribute=href | assert_throws_js: function "() => {
sourceElement.setAttributeNode(sourceAttr);
}" threw object "TypeError: Failed to execute 'setAttributeNode' on 'Element': This document requires 'TrustedScriptURL' assignment." ("TypeError") expected instance of function "function TypeError() { [native code] }" ("TypeError") at Test.<anonymous> (https://not-wpt.live/trusted-types/Element-setAttribute-respects-Elements-node-documents-globals-CSP-after-adoption-from-non-TT-realm.html:114:17)
at Test.step (https://not-wpt.live/resources/testharness.js:2642:25)
at HTMLIFrameElement.<anonymous> (https://not-wpt.live/resources/testharness.js:2717:32) Asserts runFail | assert_throws_js(function "function TypeError() { [native code] }", function "() => { sourceElement.setAttributeNode(sourceAttr); }")
at Test.<anonymous> ( /trusted-types/Element-setAttribute-respects-Elements-node-documents-globals-CSP-after-adoption-from-non-TT-realm.html:114:17) |
|
Fail | setAttribute and setAttributeNode respect the element's node document's global's CSP;
Element=script; Parent=svg; Attribute=xlink:href | assert_throws_js: function "() => {
sourceElement.setAttributeNode(sourceAttr);
}" threw object "TypeError: Failed to execute 'setAttributeNode' on 'Element': This document requires 'TrustedScriptURL' assignment." ("TypeError") expected instance of function "function TypeError() { [native code] }" ("TypeError") at Test.<anonymous> (https://not-wpt.live/trusted-types/Element-setAttribute-respects-Elements-node-documents-globals-CSP-after-adoption-from-non-TT-realm.html:114:17)
at Test.step (https://not-wpt.live/resources/testharness.js:2642:25)
at HTMLIFrameElement.<anonymous> (https://not-wpt.live/resources/testharness.js:2717:32) Asserts runFail | assert_throws_js(function "function TypeError() { [native code] }", function "() => { sourceElement.setAttributeNode(sourceAttr); }")
at Test.<anonymous> ( /trusted-types/Element-setAttribute-respects-Elements-node-documents-globals-CSP-after-adoption-from-non-TT-realm.html:114:17) |
|