-
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
Add tests for dialog centering #4605
Conversation
Notifying @Ms2ger, @ayg, @gsnedders, @jdm, @jgraham, @sideshowbarker, @zcorpan, and @zqzhang. (Learn how reviewing works.) |
Firefox (nightly channel)Testing web-platform-tests at revision c38f204 All results/html/semantics/interactive-elements/the-dialog-element/centering.html
|
Chrome (unstable channel)Testing web-platform-tests at revision c38f204 All results/html/semantics/interactive-elements/the-dialog-element/centering.html
|
writing-mode: {{GET[html-writing-mode]}} | ||
} | ||
|
||
dialog, body { |
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.
We can't use body
here because 'writing-mode' propagates from body
to the viewport. Should use a div
. Also don't need to put dialog
in the selector since it's inherited.
iframe.height = iframeHeight; | ||
iframe.onload = t.step_func_done(() => { | ||
const dialog = iframe.contentDocument.querySelector("dialog"); | ||
assert_equals(window.getComputedStyle(dialog)[property], numericValue + "px"); |
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.
I think this should probably invoke the iframe's getComputedStyle
to avoid weirdness with crossing globals.
@zcorpan review comments addressed. Still hoping for your help on the TODOs :) |
Ping @zcorpan |
These tests are now available on w3c-test.org |
Finally got around to this, sorry for the delay. |
Great!! Your changes LGTM, hopefully my changes LGTY, so we can land this? Travis is having trouble finding Firefox nightly... I restarted it to see what happens. Maybe rebasing would help too if the test infra has changed since the original PR. |
Restarting won't help, need to rebase. (Edit: now done) |
This seems like it might help avoid some false positives
c363a98
to
21f3078
Compare
Firefox (nightly channel)Testing web-platform-tests at revision 190a5d5 All results1 test ran/html/semantics/interactive-elements/the-dialog-element/centering.html
|
Chrome (unstable channel)Testing web-platform-tests at revision 190a5d5 All results1 test ran/html/semantics/interactive-elements/the-dialog-element/centering.html
|
Sigh, the spec's small-screen style is messing with this, since the iframe is small... |
Firefox (nightly channel)Testing web-platform-tests at revision 3b248100668aebdc5f58cca3135c0aecf31728d3 |
Chrome (unstable channel)Testing web-platform-tests at revision 3b248100668aebdc5f58cca3135c0aecf31728d3 |
Follows whatwg/html#2208.
Several of these are probably wrong but I feel I've gone as far as I can with my knowledge of writing modes. @zcorpan can you take this over from here?
This change is