mirror of
https://github.com/servo/servo.git
synced 2025-08-22 05:45:33 +01:00
Update web-platform-tests to revision be5419e845d39089ba6dc338c1bd0fa279108317
This commit is contained in:
parent
aa199307c8
commit
2b6f573eb5
3440 changed files with 109438 additions and 41750 deletions
|
@ -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>
|
Loading…
Add table
Add a link
Reference in a new issue