Summary

Harness status: OK

Found 7 tests

Details

ResultTest NameMessage
PassouterHTML with html assigned via policy (successful HTML transformation).
Asserts run
Pass
assert_equals("Quack, I want to be a duck!", "Quack, I want to be a duck!")
    at Test.<anonymous> ( /trusted-types/block-string-assignment-to-Element-outerHTML.html:23:5)
Pass`outerHTML = TrustedHTML` throws NoModificationAllowedError when parent is a document.
Asserts run
Pass
assert_throws_dom("NoModificationAllowedError", function "_ => {       document.documentElement.outerHTML = p.createHTML('<p>Content</p>');     }")
    at Test.<anonymous> ( /trusted-types/block-string-assignment-to-Element-outerHTML.html:31:5)
Pass`outerHTML = string` throws.
Asserts run
Pass
assert_throws_js(function "function TypeError() { [native code] }", function "_ => {       d.outerHTML = "Fail.";     }")
    at Test.<anonymous> ( /trusted-types/block-string-assignment-to-Element-outerHTML.html:40:5)
Pass
assert_equals("", "")
    at Test.<anonymous> ( /trusted-types/block-string-assignment-to-Element-outerHTML.html:43:5)
Pass`outerHTML = string` throws TypeError even when parent is a document.
Asserts run
Pass
assert_throws_js(function "function TypeError() { [native code] }", function "_ => {       document.documentElement.outerHTML = '<p>Content</p>';     }")
    at Test.<anonymous> ( /trusted-types/block-string-assignment-to-Element-outerHTML.html:49:5)
Pass`outerHTML = null` throws.
Asserts run
Pass
assert_throws_js(function "function TypeError() { [native code] }", function "_ => {       d.outerHTML = null;     }")
    at Test.<anonymous> ( /trusted-types/block-string-assignment-to-Element-outerHTML.html:58:5)
Pass
assert_equals("", "")
    at Test.<anonymous> ( /trusted-types/block-string-assignment-to-Element-outerHTML.html:61:5)
Pass`outerHTML = string` assigned via default policy (successful HTML transformation).
Asserts run
Pass
assert_equals("Element outerHTML", "Element outerHTML")
    at createHTML ( /trusted-types/block-string-assignment-to-Element-outerHTML.html:70:9)
Pass
assert_equals("Quack, I want to be a duck!", "Quack, I want to be a duck!")
    at Test.<anonymous> ( /trusted-types/block-string-assignment-to-Element-outerHTML.html:78:5)
Pass`outerHTML = null` assigned via default policy does not throw
Asserts run
Pass
assert_equals("Element outerHTML", "Element outerHTML")
    at createHTML ( /trusted-types/block-string-assignment-to-Element-outerHTML.html:70:9)
Pass
assert_equals("", "")
    at Test.<anonymous> ( /trusted-types/block-string-assignment-to-Element-outerHTML.html:89:5)