Update web-platform-tests to revision be5419e845d39089ba6dc338c1bd0fa279108317

This commit is contained in:
Josh Matthews 2018-01-04 13:44:24 -05:00
parent aa199307c8
commit 2b6f573eb5
3440 changed files with 109438 additions and 41750 deletions

View file

@ -0,0 +1,32 @@
<!DOCTYPE html>
<title>Moving fullscreen document's body into a fullscreen iframe</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="../trusted-click.js"></script>
<iframe allowfullscreen></iframe>
<script>
async_test(t => {
const iframe = document.querySelector('iframe');
const iframeDoc = iframe.contentDocument;
// Enter fullscreen for the iframe's body element.
trusted_request(t, iframeDoc.body, document.body);
document.onfullscreenchange = t.step_func(() => {
// Then, move the outer document's body into the iframe. This is an unusual
// thing to do, but means that the iframe is removed from its document and
// should trigger fullscreen exit.
iframeDoc.documentElement.appendChild(document.body);
// If we exit in an orderly fashion, that's all one can ask for.
document.onfullscreenchange = t.step_func_done(() => {
assert_equals(document.fullscreenElement, null, "document's fullscreen element");
// the iframe's contentDocument has become undefined, but the reference
// we're holding on to should not have a fullscreen element either.
assert_equals(iframe.contentDocuemnt, undefined, "iframe's content document");
assert_equals(iframeDoc.fullscreenElement, null, "iframe's fullscreen element");
});
});
});
</script>