OLD | NEW |
(Empty) | |
| 1 <!DOCTYPE html> |
| 2 <title>Element#webkitRequestFullscreen() followed by moving the element into an
iframe</title> |
| 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 <div id="target"></div> |
| 8 <iframe allowfullscreen></iframe> |
| 9 <script> |
| 10 async_test(t => { |
| 11 const target = document.getElementById("target"); |
| 12 const iframeDoc = document.querySelector("iframe").contentDocument; |
| 13 |
| 14 iframeDoc.onwebkitfullscreenchange = t.unreached_func("webkitfullscreenchange
event in iframe"); |
| 15 iframeDoc.onwebkitfullscreenerror = t.unreached_func("webkitfullscreenerror ev
ent in iframe"); |
| 16 document.onwebkitfullscreenchange = t.unreached_func("webkitfullscreenchange e
vent"); |
| 17 document.onwebkitfullscreenerror = t.step_func_done(event => { |
| 18 assert_equals(event.target, document); |
| 19 assert_equals(document.webkitFullscreenElement, null); |
| 20 assert_equals(iframeDoc.webkitFullscreenElement, null); |
| 21 }); |
| 22 |
| 23 trusted_click(t.step_func(() => { |
| 24 target.webkitRequestFullscreen(); |
| 25 iframeDoc.body.appendChild(target); |
| 26 }), document.body); |
| 27 }); |
| 28 </script> |
OLD | NEW |