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 async_test(t => { |
| 10 const iframe = document.querySelector("iframe"); |
| 11 const iframeDocument = iframe.contentDocument; |
| 12 |
| 13 document.onfullscreenchange = t.unreached_func("fullscreenchange event"); |
| 14 document.onfullscreenerror = t.unreached_func("fullscreenerror event"); |
| 15 iframeDocument.onfullscreenchange = t.unreached_func("iframe fullscreenchange
event"); |
| 16 iframeDocument.onfullscreenerror = t.unreached_func("iframe fullscreenerror ev
ent"); |
| 17 |
| 18 trusted_click(t.step_func(() => { |
| 19 iframeDocument.body.requestFullscreen(); |
| 20 iframe.remove(); |
| 21 // No events will be fired, end test after 100ms. |
| 22 setTimeout(t.step_func_done(() => { |
| 23 assert_equals(document.fullscreenElement, null); |
| 24 assert_equals(iframeDocument.fullscreenElement, null); |
| 25 }), 100); |
| 26 }), document.body); |
| 27 }); |
| 28 </script> |
OLD | NEW |