Implement trusted types for setTimeout/setInterval (#38736)

I had a difficult time figuring out where the relevant steps had to be
added. Therefore, I aggressively commented the spec steps so eventually
I discovered where I should add them.

Part of #36258

---------

Signed-off-by: Tim van der Lippe <tvanderlippe@gmail.com>
Signed-off-by: Tim van der Lippe <TimvdLippe@users.noreply.github.com>
Co-authored-by: Josh Matthews <josh@joshmatthews.net>
This commit is contained in:
Tim van der Lippe 2025-08-17 22:53:16 +02:00 committed by GitHub
parent a31235e52b
commit 4de9a9d100
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
16 changed files with 149 additions and 120 deletions

View file

@ -1,7 +0,0 @@
[DedicatedWorker-setTimeout-setInterval.html]
expected: TIMEOUT
[DedicatedWorkerGlobalScope.setTimeout assigned via default policy (successful Script transformation).]
expected: TIMEOUT
[DedicatedWorkerGlobalScope.setInterval assigned via default policy (successful Script transformation).]
expected: TIMEOUT

View file

@ -1,7 +0,0 @@
[Window-setTimeout-setInterval.html]
expected: TIMEOUT
[Window.setTimeout assigned via default policy (successful Script transformation).]
expected: TIMEOUT
[Window.setInterval assigned via default policy (successful Script transformation).]
expected: TIMEOUT

View file

@ -1,12 +0,0 @@
[block-string-assignment-to-DedicatedWorker-setTimeout-setInterval.html]
[`DedicatedWorkerGlobalScope.setTimeout(string)` throws.]
expected: FAIL
[`DedicatedWorkerGlobalScope.setTimeout(null)` throws.]
expected: FAIL
[`DedicatedWorkerGlobalScope.setInterval(string)` throws.]
expected: FAIL
[`DedicatedWorkerGlobalScope.setInterval(null)` throws.]
expected: FAIL

View file

@ -1,13 +0,0 @@
[block-string-assignment-to-Window-setTimeout-setInterval.html]
expected: ERROR
[`Window.setTimeout(string)` throws.]
expected: FAIL
[`Window.setTimeout(null)` throws.]
expected: FAIL
[`Window.setInterval(string)` throws.]
expected: FAIL
[`Window.setInterval(null)` throws.]
expected: FAIL

View file

@ -1,6 +0,0 @@
[should-sink-type-mismatch-violation-be-blocked-by-csp-002-worker.html]
[Checking reported violations for setTimeout(';;;;;') from DedicatedWorker]
expected: FAIL
[Location of required-trusted-types-for violations.]
expected: FAIL

View file

@ -1,3 +0,0 @@
[should-sink-type-mismatch-violation-be-blocked-by-csp-003.html]
[Location of required-trusted-types-for violations.]
expected: FAIL

View file

@ -1,3 +0,0 @@
[trusted-types-reporting-check-report-DedicatedWorker-sink-mismatch.html]
[Test number of sent reports.]
expected: FAIL

View file

@ -1,3 +0,0 @@
[trusted-types-reporting-check-report-Window-sink-mismatch.html]
[Test number of sent reports.]
expected: FAIL

View file

@ -1,6 +0,0 @@
[trusted-types-reporting-for-DedicatedWorker-setTimeout-setInterval.html]
[Violation report for setTimeout with plain string.]
expected: FAIL
[Violation report for setInterval with plain string.]
expected: FAIL

View file

@ -1,6 +0,0 @@
[trusted-types-reporting-for-Window-setTimeout-setInterval.html]
[Violation report for setTimeout with plain string.]
expected: FAIL
[Violation report for setInterval with plain string.]
expected: FAIL