Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Gecko Bug 1939866] Fix some assertions for trusted type sink tests. #49909

Merged
merged 1 commit into from
Jan 6, 2025

Conversation

moz-wptsync-bot
Copy link
Collaborator

These assertions were added in
#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.

Differential Revision: https://phabricator.services.mozilla.com/D233175

bugzilla-url: https://bugzilla.mozilla.org/show_bug.cgi?id=1939866
gecko-commit: 41077ac9b8c4ace9e7acf885d957a4b8e3bf465c
gecko-reviewers: zsun

These assertions were added in
#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.

Differential Revision: https://phabricator.services.mozilla.com/D233175

bugzilla-url: https://bugzilla.mozilla.org/show_bug.cgi?id=1939866
gecko-commit: 41077ac9b8c4ace9e7acf885d957a4b8e3bf465c
gecko-reviewers: zsun
Copy link
Collaborator

@wpt-pr-bot wpt-pr-bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The review process for this patch is being conducted in the Firefox project.

@moz-wptsync-bot moz-wptsync-bot merged commit 4c29914 into master Jan 6, 2025
19 checks passed
@moz-wptsync-bot moz-wptsync-bot deleted the gecko/1939866 branch January 6, 2025 07:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants