Skip to content
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

Merged
merged 4 commits into from
Dec 15, 2016
Merged
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
21 changes: 21 additions & 0 deletions fullscreen/api/active-document-fullscreenEnabled.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<!DOCTYPE html>
<title>fullscreenEnabled when the element's document is not the active document</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<div id="log"></div>
<iframe allowfullscreen></iframe>
<script>
var t = async_test();

onload = t.step_func(() => {
var iframe = document.querySelector("iframe");
var documentBeforeNav = iframe.contentDocument;

iframe.onload = t.step_func_done(() => {
assert_false(documentBeforeNav.fullscreenEnabled);
});

// Navigate the iframe
window[0].location.href = '/common/blank.html';
Copy link
Member

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 :)

});
</script>