OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <title>Element#requestFullscreen() followed by moving the element into an iframe
</title> | 2 <title>Element#requestFullscreen() followed by moving the element into an iframe
</title> |
3 <script src="/resources/testharness.js"></script> | 3 <script src="/resources/testharness.js"></script> |
4 <script src="/resources/testharnessreport.js"></script> | 4 <script src="/resources/testharnessreport.js"></script> |
5 <script src="../trusted-click.js"></script> | 5 <script src="../trusted-click.js"></script> |
6 <div id="log"></div> | 6 <div id="log"></div> |
7 <div id="target"></div> | 7 <div id="target"></div> |
8 <iframe allowfullscreen></iframe> | 8 <iframe allowfullscreen></iframe> |
9 <script> | 9 <script> |
10 async_test(t => { | 10 async_test(t => { |
11 const target = document.getElementById("target"); | 11 const target = document.getElementById("target"); |
12 const iframeDoc = document.querySelector("iframe").contentDocument; | 12 const iframeDoc = document.querySelector("iframe").contentDocument; |
13 | 13 |
14 iframeDoc.onfullscreenchange = t.unreached_func("fullscreenchange event in ifr
ame"); | 14 iframeDoc.onfullscreenchange = t.unreached_func("fullscreenchange event in ifr
ame"); |
15 iframeDoc.onfullscreenerror = t.unreached_func("fullscreenerror event in ifram
e"); | 15 iframeDoc.onfullscreenerror = t.unreached_func("fullscreenerror event in ifram
e"); |
16 document.onfullscreenchange = t.unreached_func("fullscreenchange event"); | 16 document.onfullscreenchange = t.unreached_func("fullscreenchange event"); |
17 document.onfullscreenerror = t.step_func_done(() => { | 17 document.onfullscreenerror = t.step_func_done(() => { |
18 assert_equals(document.fullscreenElement, null); | 18 assert_equals(document.fullscreenElement, null); |
| 19 assert_equals(iframeDoc.fullscreenElement, null); |
19 }); | 20 }); |
20 | 21 |
21 trusted_click(t.step_func(() => { | 22 trusted_click(t.step_func(() => { |
22 target.requestFullscreen(); | 23 target.requestFullscreen(); |
23 iframeDoc.body.appendChild(target); | 24 iframeDoc.body.appendChild(target); |
24 }), document.body); | 25 }), document.body); |
25 }); | 26 }); |
26 </script> | 27 </script> |
OLD | NEW |