Summary

Harness status: OK

Found 4 tests

Details

ResultTest NameMessage
FailsetAttribute and setAttributeNode respect the element's node document's global's CSP; Element=iframe; Parent=div; Attribute=srcdocassert_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 run
Fail
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)
FailsetAttribute and setAttributeNode respect the element's node document's global's CSP; Element=script; Parent=div; Attribute=srcassert_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 run
Fail
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)
FailsetAttribute and setAttributeNode respect the element's node document's global's CSP; Element=script; Parent=svg; Attribute=hrefassert_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 run
Fail
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)
FailsetAttribute and setAttributeNode respect the element's node document's global's CSP; Element=script; Parent=svg; Attribute=xlink:hrefassert_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 run
Fail
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)