Closed Bug 1939866 Opened 2 months ago Closed 2 months ago

Fix some assertions for trusted type sink tests

Categories

(Core :: DOM: Security, defect)

defect

Tracking

()

RESOLVED FIXED
135 Branch
Tracking Status
firefox135 --- fixed

People

(Reporter: fredw, Assigned: fredw)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

These assertions were added in
https://github.com/web-platform-tests/wpt/pull/46089

They intend to check the value of the passed sink name to the callbacks
of the default policy, based on the passed trusted type name. However,
the corresponding switch statements are no-op because they actually
expect trusted type (objects) rather than trusted type names (strings).

For default-policy-callback-arguments.html we just remove the
switch statement, since the sink name is already tested just above.
We fix the switch for the other files, renaming the argument to
trustedTypeName to make more explicit it is a string and adding a
default branch to catch any unknown type name.

Pushed by fwang@igalia.com: https://hg.mozilla.org/integration/autoland/rev/41077ac9b8c4 Fix some assertions for trusted type sink tests. r=zsun
Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/49909 for changes under testing/web-platform/tests
Status: NEW → RESOLVED
Closed: 2 months ago
Resolution: --- → FIXED
Target Milestone: --- → 135 Branch
Upstream PR merged by moz-wptsync-bot
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: