-
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
Test that requestFullscreen() works for svg:svg but not svg:rect #3830
Conversation
@upsuper PTAL. element-request-fullscreen-svg-rect-manual.html is failing in Firefox and in Chrome, so you might want to file a bug for that. |
Thanks. Filed bug 1305928 for that. |
Taking that as review and merging, please shout if you didn't actually review and find something wrong after the fact. |
var svg = document.querySelector("svg"); | ||
assert_true(svg instanceof SVGSVGElement); | ||
trusted_request(svg, document.body); | ||
document.onfullscreenchange = t.step_func_done(); |
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.
In this test, t.step_func_done()
would be called twice. Would that be counted as an error somehow?
In Gecko's test, we do count extra call to ending function as a test failure. Not sure whether wpt is lenient on this.
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 test can only call t.step_func_done()
once, where would the second time be?
In testharness.js, nothing that happens after the first failure or done event matters, so in general it's fine if there are two ways the test can pass and if both happen.
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.
The second time would be when exiting fullscreen, I think. If anything after first done doesn't count, then probably fine.
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.
Ah, the test actually never exits fullscreen, which I guess is annoying when testing manually. If it did it'd still not be necessary to clean up this event handler to avoid the extra call to t.step_func_done()
though.
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.
It overall looks fine to me.
https://fullscreen.spec.whatwg.org/#dom-element-requestfullscreen