-
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
Fix "relevant mutations" tests for <img> crossorigin attribute #16357
Fix "relevant mutations" tests for <img> crossorigin attribute #16357
Conversation
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.
These are intentionally omitting src
. They are testing that load
and error
are not fired as a result of mutating crossorigin
when there's no src
(or srcset
/picture
).
It could be useful to also have tests for mutating crossorigin
with src
, and certainly there could be source comments explaining things.
A previous PR that touched these tests: #2136
I see, that clears things up a bit. Thanks!
It certainly would, since both Firefox and Chromium fail these tests :) I'll put the old tests back in addition to these "new" tests. edit: I'm not sure why adding this comment caused the bot to ping a whole bunch of people all at once. Excuse me if I've done something wrong! |
42a133b
to
b387321
Compare
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! The relevant mutations says "The element's crossorigin attribute's state is changed.", and these tests all change the state. (empty to "anonymous", or "foo" to "bar", would not change state.)
Can you report bugs on browsers that fail the new tests?
@wpt-pr-bot should have done its thing when the PR was created. I'm not sure why it didn't, but it has happened before. |
html/semantics/embedded-content/the-img-element/relevant-mutations.html
Outdated
Show resolved
Hide resolved
Yep! The existing "crossorigin state not changed" cases cover the other side of this.
Can do! |
b387321
to
15d6ea0
Compare
Hmm, looking at the diff, seems that last push got mangled somewhere along the way. One sec... |
These test cases verify that changing an <img> tag's crossorigin attribute state causes the image resource to be reloaded (as per "4.8.4.3.2 Reacting to DOM mutations" in the HTML spec).
15d6ea0
to
9ecffbf
Compare
Okay, fixed. |
Thank you! Please add a comment linking to bugs for this. |
These test cases are supposed to verify that changing an
<img>
tag'scrossorigin
attribute state causes the image resource to be reloaded (as per "4.8.4.3.2 Reacting to DOM mutations" in the HTML spec). However, they were set to expect a'timeout'
, which doesn't make any sense: the expected result should be a'load'
. They were passing regardless of implementation correctness because the corresponding<img>
tags were missingsrc
attributes, which prevented load events from being generated.See also: whatwg/html#4533