Summary

Harness status: OK

Found 11 tests

Details

ResultTest NameMessage
PassSetting HTMLDivElement.innerHTML to a plain string
Asserts run
Pass
assert_throws_js(function "function TypeError() { [native code] }", function "_ => { divElement.innerHTML = plain_string; }")
    at Test.<anonymous> ( /trusted-types/block-string-assignment-to-text-and-url-sinks.html:36:5)
Pass
assert_equals("TrustedHTML", "TrustedHTML")
    at Test.<anonymous> ( /trusted-types/block-string-assignment-to-text-and-url-sinks.html:37:5)
Pass
assert_equals("Element innerHTML", "Element innerHTML")
    at Test.<anonymous> ( /trusted-types/block-string-assignment-to-text-and-url-sinks.html:38:5)
PassSetting HTMLScriptElement.innerHTML to a plain string
Asserts run
Pass
assert_throws_js(function "function TypeError() { [native code] }", function "_ => { scriptElement.innerHTML = plain_string; }")
    at Test.<anonymous> ( /trusted-types/block-string-assignment-to-text-and-url-sinks.html:44:5)
Pass
assert_equals("TrustedHTML", "TrustedHTML")
    at Test.<anonymous> ( /trusted-types/block-string-assignment-to-text-and-url-sinks.html:45:5)
Pass
assert_equals("Element innerHTML", "Element innerHTML")
    at Test.<anonymous> ( /trusted-types/block-string-assignment-to-text-and-url-sinks.html:46:5)
PassSetting SVGScriptElement.innerHTML to a plain string
Asserts run
Pass
assert_throws_js(function "function TypeError() { [native code] }", function "_ => { svgScriptElement.innerHTML = plain_string; }")
    at Test.<anonymous> ( /trusted-types/block-string-assignment-to-text-and-url-sinks.html:52:5)
Pass
assert_equals("TrustedHTML", "TrustedHTML")
    at Test.<anonymous> ( /trusted-types/block-string-assignment-to-text-and-url-sinks.html:53:5)
Pass
assert_equals("Element innerHTML", "Element innerHTML")
    at Test.<anonymous> ( /trusted-types/block-string-assignment-to-text-and-url-sinks.html:54:5)
PassSetting HTMLDivElement.innerText to a plain string
Asserts run
Pass
assert_equals(undefined, undefined)
    at Test.<anonymous> ( /trusted-types/block-string-assignment-to-text-and-url-sinks.html:61:5)
Pass
assert_equals(undefined, undefined)
    at Test.<anonymous> ( /trusted-types/block-string-assignment-to-text-and-url-sinks.html:62:5)
Pass
assert_equals("Hello World!", "Hello World!")
    at Test.<anonymous> ( /trusted-types/block-string-assignment-to-text-and-url-sinks.html:63:5)
FailSetting HTMLScriptElement.innerText to a plain stringassert_equals: expected "HTMLScriptElement innerText" but got "HTMLElement innerText"
    at Test.<anonymous> (https://www1.wpt.live/trusted-types/block-string-assignment-to-text-and-url-sinks.html:71:5)
    at Test.step (https://www1.wpt.live/resources/testharness.js:2642:25)
    at test (https://www1.wpt.live/resources/testharness.js:633:30)
    at https://www1.wpt.live/trusted-types/block-string-assignment-to-text-and-url-sinks.html:67:3
Asserts run
Pass
assert_throws_js(function "function TypeError() { [native code] }", function "_ => { scriptElement.innerText = plain_string; }")
    at Test.<anonymous> ( /trusted-types/block-string-assignment-to-text-and-url-sinks.html:69:5)
Pass
assert_equals("TrustedScript", "TrustedScript")
    at Test.<anonymous> ( /trusted-types/block-string-assignment-to-text-and-url-sinks.html:70:5)
Fail
assert_equals("HTMLElement innerText", "HTMLScriptElement innerText")
    at Test.<anonymous> ( /trusted-types/block-string-assignment-to-text-and-url-sinks.html:71:5)
PassSetting SVGScriptElement.innerText to a plain string
Asserts run
Pass
assert_equals(undefined, undefined)
    at Test.<anonymous> ( /trusted-types/block-string-assignment-to-text-and-url-sinks.html:78:5)
Pass
assert_equals(undefined, undefined)
    at Test.<anonymous> ( /trusted-types/block-string-assignment-to-text-and-url-sinks.html:79:5)
Pass
assert_equals("Hello World!", "Hello World!")
    at Test.<anonymous> ( /trusted-types/block-string-assignment-to-text-and-url-sinks.html:80:5)
PassSetting HTMLDivElement.textContent to a plain string
Asserts run
Pass
assert_equals(undefined, undefined)
    at Test.<anonymous> ( /trusted-types/block-string-assignment-to-text-and-url-sinks.html:87:5)
Pass
assert_equals(undefined, undefined)
    at Test.<anonymous> ( /trusted-types/block-string-assignment-to-text-and-url-sinks.html:88:5)
Pass
assert_equals("Hello World!", "Hello World!")
    at Test.<anonymous> ( /trusted-types/block-string-assignment-to-text-and-url-sinks.html:89:5)
FailSetting HTMLScriptElement.textContent to a plain stringassert_equals: expected "HTMLScriptElement textContent" but got "Node textContent"
    at Test.<anonymous> (https://www1.wpt.live/trusted-types/block-string-assignment-to-text-and-url-sinks.html:97:5)
    at Test.step (https://www1.wpt.live/resources/testharness.js:2642:25)
    at test (https://www1.wpt.live/resources/testharness.js:633:30)
    at https://www1.wpt.live/trusted-types/block-string-assignment-to-text-and-url-sinks.html:93:3
Asserts run
Pass
assert_throws_js(function "function TypeError() { [native code] }", function "_ => { scriptElement.textContent = plain_string; }")
    at Test.<anonymous> ( /trusted-types/block-string-assignment-to-text-and-url-sinks.html:95:5)
Pass
assert_equals("TrustedScript", "TrustedScript")
    at Test.<anonymous> ( /trusted-types/block-string-assignment-to-text-and-url-sinks.html:96:5)
Fail
assert_equals("Node textContent", "HTMLScriptElement textContent")
    at Test.<anonymous> ( /trusted-types/block-string-assignment-to-text-and-url-sinks.html:97:5)
PassSetting SVGScriptElement.textContent to a plain string
Asserts run
Pass
assert_equals(undefined, undefined)
    at Test.<anonymous> ( /trusted-types/block-string-assignment-to-text-and-url-sinks.html:104:5)
Pass
assert_equals(undefined, undefined)
    at Test.<anonymous> ( /trusted-types/block-string-assignment-to-text-and-url-sinks.html:105:5)
Pass
assert_equals("Hello World!", "Hello World!")
    at Test.<anonymous> ( /trusted-types/block-string-assignment-to-text-and-url-sinks.html:106:5)
PassSetting HTMLScriptElement.text to a plain string
Asserts run
Pass
assert_throws_js(function "function TypeError() { [native code] }", function "_ => { scriptElement.text = plain_string; }")
    at Test.<anonymous> ( /trusted-types/block-string-assignment-to-text-and-url-sinks.html:112:5)
Pass
assert_equals("TrustedScript", "TrustedScript")
    at Test.<anonymous> ( /trusted-types/block-string-assignment-to-text-and-url-sinks.html:113:5)
Pass
assert_equals("HTMLScriptElement text", "HTMLScriptElement text")
    at Test.<anonymous> ( /trusted-types/block-string-assignment-to-text-and-url-sinks.html:114:5)
PassSetting HTMLScriptElement.src to a plain string
Asserts run
Pass
assert_throws_js(function "function TypeError() { [native code] }", function "_ => { scriptElement.src = plain_string; }")
    at Test.<anonymous> ( /trusted-types/block-string-assignment-to-text-and-url-sinks.html:120:5)
Pass
assert_equals("TrustedScriptURL", "TrustedScriptURL")
    at Test.<anonymous> ( /trusted-types/block-string-assignment-to-text-and-url-sinks.html:121:5)
Pass
assert_equals("HTMLScriptElement src", "HTMLScriptElement src")
    at Test.<anonymous> ( /trusted-types/block-string-assignment-to-text-and-url-sinks.html:122:5)