-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
[geometry] Test that DOMMatrix CSS parsing is not exposed in workers #5769
Conversation
Notifying @dirkschulze, @peterjoel, and @tschneidereit. (Learn how reviewing works.) |
Annotate setMatrixValue with [Exposed=Window] and throw TypeError when DOMMatrix/DOMMatrixReadOnly is constructed with a string if the current global is not a Window. Fixes #122. Tests: web-platform-tests/wpt#5769
Firefox (nightly channel)Testing web-platform-tests at revision 9d68b49 All results1 test ran/css/geometry-1/DOMMatrix-css-string.worker.html
|
Chrome (unstable channel)Testing web-platform-tests at revision 955a5991c499b61faf6ef77283a527597c5d3628 All results1 test ran/css/geometry-1/DOMMatrix-css-string.worker.html
|
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.
LGTM % nit
|
||
['DOMMatrix', 'DOMMatrixReadOnly'].forEach(constr => { | ||
test(() => { | ||
assert_true(constr in self, `${constr} is not supported`); |
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.
When this fails, it will be "assert_true: DOMMatrix is not supported expected true got false". In other words, the description is inverted, if it describes the expected value (maybe "self.${constr} exists") then the message will make sense. Or just no description since there's just one assert_true in the test.
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.
Changed to ${constr} should exist
Annotate setMatrixValue with [Exposed=Window] and throw TypeError when DOMMatrix/DOMMatrixReadOnly is constructed with a string if the current global is not a Window. Fixes #122. Tests: web-platform-tests/wpt#5769
Followup for #5769 Relevant spec change: w3c/fxtf-drafts#141
Followup for #5769 Relevant spec change: w3c/fxtf-drafts#141
Follows w3c/fxtf-drafts#141.