-
Notifications
You must be signed in to change notification settings - Fork 3.5k
Add test for importing a srcdoc
attribute node from a non-TT realm to a TT iframe element throws
#44323
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
Conversation
Stumbled on #44352, which either needs to be fixed or worked around. |
…l> and further simplify it
…s created in a non-TT enforcing realm are imported to a TT-enforcing realm See <https://w3c.github.io/trusted-types/dist/spec/#validate-attribute-mutation>. This excludes tests for <https://w3c.github.io/trusted-types/dist/spec/#enforcement-in-event-handler-content-attributes> which will have to be added once that part of the spec is propagated to the HTML spec. The remaining tests mentioned at <w3c/trusted-types#425 (comment)> will be added in separate commits.
…ment`'s and `sourceAttr`s realms differ
…e element's node document's global's CSP Requires #45405 to be fixed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, this looks like the correct test.
I wonder if we should also test the inverse. That when you take an element out of a TT global, TT is no longer enforced for it.
I don't know how relevant that scenario is. @koto: any experience with that? |
It's relevant for ensuring the specification is implemented correctly. |
True; but is that scenario actually relevant in practice? |
That does not matter for conformance tests. The whole point is that we can't know what websites might do and might rely on. |
Agreed. Added w3c/trusted-types#425 (comment) so that another test will be added. |
@annevk: can you please merge this test, I lack rights. |
For future reference, this test has the following issues:
I'll fix the test in https://bugzilla.mozilla.org/show_bug.cgi?id=1950626, probably moving the "which realm the TypeError is coming from" check into a separate test since that was not really what the initial test meant to check anyway. |
…-globals-CSP-after-adoption-from-non-TT-realm.html. See #44323 (comment) Also add a more direct test for the TypeError realm. Differential Revision: https://phabricator.services.mozilla.com/D239894 bugzilla-url: https://bugzilla.mozilla.org/show_bug.cgi?id=1950626 gecko-commit: cfc415b178e0e9719e0124df703b3125d1484251 gecko-reviewers: smaug
…de-documents-globals-CSP-after-adoption-from-non-TT-realm.html. r=smaug See web-platform-tests/wpt#44323 (comment) Also add a more direct test for the TypeError realm. Differential Revision: https://phabricator.services.mozilla.com/D239894
…de-documents-globals-CSP-after-adoption-from-non-TT-realm.html. r=smaug See web-platform-tests/wpt#44323 (comment) Also add a more direct test for the TypeError realm. Differential Revision: https://phabricator.services.mozilla.com/D239894
…-globals-CSP-after-adoption-from-non-TT-realm.html. See #44323 (comment) Also add a more direct test for the TypeError realm. Differential Revision: https://phabricator.services.mozilla.com/D239894 bugzilla-url: https://bugzilla.mozilla.org/show_bug.cgi?id=1950626 gecko-commit: cfc415b178e0e9719e0124df703b3125d1484251 gecko-reviewers: smaug
…de-documents-globals-CSP-after-adoption-from-non-TT-realm.html. r=smaug See web-platform-tests/wpt#44323 (comment) Also add a more direct test for the TypeError realm. Differential Revision: https://phabricator.services.mozilla.com/D239894 UltraBlame original commit: cfc415b178e0e9719e0124df703b3125d1484251
…de-documents-globals-CSP-after-adoption-from-non-TT-realm.html. r=smaug See web-platform-tests/wpt#44323 (comment) Also add a more direct test for the TypeError realm. Differential Revision: https://phabricator.services.mozilla.com/D239894 UltraBlame original commit: cfc415b178e0e9719e0124df703b3125d1484251
…de-documents-globals-CSP-after-adoption-from-non-TT-realm.html. r=smaug See web-platform-tests/wpt#44323 (comment) Also add a more direct test for the TypeError realm. Differential Revision: https://phabricator.services.mozilla.com/D239894 UltraBlame original commit: cfc415b178e0e9719e0124df703b3125d1484251
…de-documents-globals-CSP-after-adoption-from-non-TT-realm.html. r=smaug See web-platform-tests/wpt#44323 (comment) Also add a more direct test for the TypeError realm. Differential Revision: https://phabricator.services.mozilla.com/D239894
…de-documents-globals-CSP-after-adoption-from-non-TT-realm.html. r=smaug See web-platform-tests/wpt#44323 (comment) Also add a more direct test for the TypeError realm. Differential Revision: https://phabricator.services.mozilla.com/D239894
First step to fix w3c/trusted-types#425.
Will add separate commits for the other tests requested at above ticket.