-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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 active document check for requestFullscreen #4334
Conversation
Notifying @aliams, @foolip, @jernoble, and @upsuper. (Learn how reviewing works.) |
FirefoxTesting revision 9f93722 All results/fullscreen/api/document-fullscreen-enabled-active-document.html
|
ChromeTesting revision 9f93722 All results/fullscreen/api/document-fullscreen-enabled-active-document.html
|
whatwg/fullscreen#67 points out that the queued event can't really be fired in an inactive document, so this should time out. Need to figure out what correct behavior should be and test that. Should add:
|
trusted_request(iframes[0].contentDocument.body, document.body); | ||
window[0].location.href = '/common/blank.html'; | ||
iframes[0].contentDocument.onfullscreenchange = t.unreached_func("fullscreenchange event"); | ||
iframes[0].contentDocument.onfullscreenerror = 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.
Oh, wait. This is wrong. iframes[0].contentDocument
is a different than the previous document you request fullscreen on, so these events are never triggered.
You need to record the previous document and set event handlers on that.
Also, shouldn't it be easier to just check document.fullscreenEnabled
?
I think you can simply check |
OK, yeah that seems reasonable. It may be worth testing events and the promise as well, so the behavior there is interoperable. |
In that case, I suggest you split the events test out, because that test would still need manual action, which is not great. |
}); | ||
|
||
// Navigate the iframe | ||
window[0].location.href = '/common/blank.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.
Oh, so window has an indexed getter for the window objects of its child browsing contexts, I never knew :)
Options nit to make file name and test title derivative of document-fullscreen-enabled.html, otherwise OK to merge. |
This is cherry-picked from #4309