OLD | NEW |
| (Empty) |
1 <!DOCTYPE html> | |
2 <title>Element#requestFullscreen() in iframe followed by removing the iframe</ti
tle> | |
3 <script src="../../resources/testharness.js"></script> | |
4 <script src="../../resources/testharnessreport.js"></script> | |
5 <script src="../trusted-click.js"></script> | |
6 <div id="log"></div> | |
7 <iframe allowfullscreen></iframe> | |
8 <script> | |
9 // Adapted from https://github.com/w3c/web-platform-tests/pull/4250 | |
10 // TODO(foolip): Remove this test when the above is imported and passing. | |
11 async_test(t => { | |
12 const iframe = document.querySelector("iframe"); | |
13 const iframeDocument = iframe.contentDocument; | |
14 | |
15 document.onfullscreenchange = t.step_func_done(() => { | |
16 assert_equals(document.fullscreenElement, null); | |
17 assert_equals(iframeDocument.fullscreenElement, null); | |
18 }); | |
19 document.onfullscreenerror = t.unreached_func("fullscreenerror event"); | |
20 iframeDocument.onfullscreenchange = t.unreached_func("iframe fullscreenchange
event"); | |
21 iframeDocument.onfullscreenerror = t.unreached_func("iframe fullscreenerror ev
ent"); | |
22 | |
23 trusted_click(t.step_func(() => { | |
24 iframeDocument.body.requestFullscreen(); | |
25 iframe.remove(); | |
26 }), document.body); | |
27 }); | |
28 </script> | |
OLD | NEW |