Summary

Harness status: OK

Found 9 tests

Details

ResultTest NameMessage
PassWindow.setTimeout assigned via policy (successful Script transformation).
Asserts runNo asserts ran
Pass`Window.setTimeout(string)` throws.
Asserts run
Pass
assert_throws_js(function "function TypeError() { [native code] }", function "_ => {     setTimeout("globalThis.timeoutTestString();");   }")
    at Test.<anonymous> ( /trusted-types/support/block-string-assignment-to-DOMWindowTimers-setTimeout-setInterval.js:15:3)
Pass`Window.setTimeout(null)` throws.
Asserts run
Pass
assert_throws_js(function "function TypeError() { [native code] }", function "_ => {     globalThis.setTimeout(null);   }")
    at Test.<anonymous> ( /trusted-types/support/block-string-assignment-to-DOMWindowTimers-setTimeout-setInterval.js:22:3)
PassWindow.setInterval assigned via policy (successful Script transformation).
Asserts runNo asserts ran
Pass`Window.setInterval(string)` throws.
Asserts run
Pass
assert_throws_js(function "function TypeError() { [native code] }", function "_ => {     globalThis.setInterval("globalThis.intervalTestString()");   }")
    at Test.<anonymous> ( /trusted-types/support/block-string-assignment-to-DOMWindowTimers-setTimeout-setInterval.js:39:3)
Pass`Window.setInterval(null)` throws.
Asserts run
Pass
assert_throws_js(function "function TypeError() { [native code] }", function "_ => {     globalThis.setInterval(null);   }")
    at Test.<anonymous> ( /trusted-types/support/block-string-assignment-to-DOMWindowTimers-setTimeout-setInterval.js:46:3)
Pass`Window.setTimeout(string)`, `Window.setInterval(string)` via default policy (successful Script transformation).
Asserts runNo asserts ran
Pass`Window.setTimeout(null)`, `Window.setInterval(null)` via default policy (successful Script transformation).
Asserts runNo asserts ran
PassWindow.setTimeout and Window.setInterval pass the correct sink to the default policy
Asserts run
Pass
assert_equals("Window setTimeout", "Window setTimeout")
    at createScript ( /trusted-types/support/block-string-assignment-to-DOMWindowTimers-setTimeout-setInterval.js:59:5)
Pass
assert_equals("Window setInterval", "Window setInterval")
    at createScript ( /trusted-types/support/block-string-assignment-to-DOMWindowTimers-setTimeout-setInterval.js:61:5)