[wpt-sync] Sync PR 53766 - [Trusted Types] Handle policy functions without return values.
Categories
(Core :: DOM: Security, task, P4)
Tracking
()
Tracking | Status | |
---|---|---|
firefox142 | --- | fixed |
People
(Reporter: wpt-sync, Unassigned)
References
()
Details
(Whiteboard: [wptsync downstream])
Sync web-platform-tests PR 53766 into mozilla-central (this bug is closed when the sync is complete).
PR: https://github.com/web-platform-tests/wpt/pull/53766
Details from upstream follow.
Daniel Vogelheim <vogelheim@chromium.org> wrote:
[Trusted Types] Handle policy functions without return values.
When a user-supplied policy callback does not return a value, the
expected behaviour differs between manually calling a regular policy
and the default policy being called automatically. This was previously
handled by the same code.Here, we split out the trusted type creation function in an "Internal"
method, which can then be called from both the API function and the
default policy. They each then need to do their own handling of the
"null-ish" String case.Bug: 430335244
Change-Id: I67d422d04685453437ae0fd4edcd93aac45230ec
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6718391
Reviewed-by: Yifan Luo \<lyf@chromium.org>
Commit-Queue: Daniel Vogelheim \<vogelheim@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1486831}
Assignee | ||
Updated•25 days ago
|
Assignee | ||
Comment 1•25 days ago
|
||
Assignee | ||
Comment 2•25 days ago
|
||
Assignee | ||
Comment 3•25 days ago
|
||
CI Results
Ran 9 Firefox configurations based on mozilla-central, and Firefox, Chrome, and Safari on GitHub CI
Total 1 tests and 3 subtests
Status Summary
Firefox
OK
: 1
PASS
: 3
FAIL
: 3
Chrome
CRASH
: 1
Safari
OK
: 1
PASS
: 2
FAIL
: 1
Links
Gecko CI (Treeherder)
GitHub PR Head
GitHub PR Base
Details
New Tests That Don't Pass
- /trusted-types/policy-without-return-value.sub.html [wpt.fyi]
- createHTML with a policy that returns undefined:
FAIL
[GitHub
],PASS
[Gecko-android-em-7.0-x86_64-lite-qr-opt-geckoview
,Gecko-android-em-7.0-x86_64-qr-debug-geckoview
,Gecko-android-em-7.0-x86_64-qr-opt-geckoview
,Gecko-linux2404-64-debug
,Gecko-linux2404-64-opt
,Gecko-windows11-32-24h2-debug
,Gecko-windows11-32-24h2-opt
,Gecko-windows11-64-24h2-debug
,Gecko-windows11-64-24h2-opt
] (Safari:PASS
) - createScript with a policy that returns undefined:
FAIL
[GitHub
],PASS
[Gecko-android-em-7.0-x86_64-lite-qr-opt-geckoview
,Gecko-android-em-7.0-x86_64-qr-debug-geckoview
,Gecko-android-em-7.0-x86_64-qr-opt-geckoview
,Gecko-linux2404-64-debug
,Gecko-linux2404-64-opt
,Gecko-windows11-32-24h2-debug
,Gecko-windows11-32-24h2-opt
,Gecko-windows11-64-24h2-debug
,Gecko-windows11-64-24h2-opt
] (Safari:PASS
) - createScriptURL with a policy that returns undefined:
FAIL
[GitHub
],PASS
[Gecko-android-em-7.0-x86_64-lite-qr-opt-geckoview
,Gecko-android-em-7.0-x86_64-qr-debug-geckoview
,Gecko-android-em-7.0-x86_64-qr-opt-geckoview
,Gecko-linux2404-64-debug
,Gecko-linux2404-64-opt
,Gecko-windows11-32-24h2-debug
,Gecko-windows11-32-24h2-opt
,Gecko-windows11-64-24h2-debug
,Gecko-windows11-64-24h2-opt
] (Safari:FAIL
)
- createHTML with a policy that returns undefined:
Comment 5•22 days ago
|
||
bugherder |
Description
•