OLD | NEW |
(Empty) | |
| 1 <!DOCTYPE html> |
| 2 <title>Fully exit fullscreen with two elements on stack and iframe</title> |
| 3 <script src="../../resources/testharness.js"></script> |
| 4 <script src="../../resources/testharnessreport.js"></script> |
| 5 <script src="../trusted-event.js"></script> |
| 6 <script src="fully-exit-fullscreen.js"></script> |
| 7 <div id="log"></div> |
| 8 <div> |
| 9 <iframe allowfullscreen></iframe> |
| 10 </div> |
| 11 <script> |
| 12 async_test(function(t) |
| 13 { |
| 14 var iframe = document.querySelector("iframe"); |
| 15 var iframeDocument = iframe.contentDocument; |
| 16 var iframeBody = iframeDocument.body; |
| 17 var div = iframe.parentNode; |
| 18 trusted_request(div); |
| 19 document.onfullscreenchange = t.step_func(function() |
| 20 { |
| 21 assert_equals(document.fullscreenElement, div); |
| 22 assert_equals(iframeDocument.fullscreenElement, null); |
| 23 trusted_request(iframeBody, div); |
| 24 document.onfullscreenchange = null; |
| 25 iframeDocument.onfullscreenchange = t.step_func(function() |
| 26 { |
| 27 assert_equals(document.fullscreenElement, iframe); |
| 28 assert_equals(iframeDocument.fullscreenElement, iframeBody); |
| 29 trusted_event(fully_exit_fullscreen.bind(null, iframeDocument), ifra
meBody); |
| 30 iframeDocument.onfullscreenchange = null; |
| 31 document.onfullscreenchange = t.step_func(function() |
| 32 { |
| 33 assert_equals(document.fullscreenElement, null); |
| 34 assert_equals(iframe.contentDocument.fullscreenElement, null); |
| 35 t.done(); |
| 36 }); |
| 37 }); |
| 38 }); |
| 39 }); |
| 40 </script> |
OLD | NEW |