OLD | NEW |
| (Empty) |
1 <!DOCTYPE html> | |
2 <title>Remove the child of the fullscreen element</title> | |
3 <script src="../../resources/testharness.js"></script> | |
4 <script src="../../resources/testharnessreport.js"></script> | |
5 <script src="../trusted-event.js"></script> | |
6 <div id="log"></div> | |
7 <div id="parent"> | |
8 <div></div> | |
9 </div> | |
10 <script> | |
11 async_test(function(t) | |
12 { | |
13 var parent = document.getElementById("parent"); | |
14 trusted_request(parent); | |
15 document.onfullscreenchange = t.step_func(function() | |
16 { | |
17 assert_equals(document.fullscreenElement, parent); | |
18 while (parent.firstChild) { | |
19 parent.firstChild.remove(); | |
20 } | |
21 document.onfullscreenchange = t.unreached_func("fullscreenchange event")
; | |
22 // A fullscreenchange event would be fired after an async section | |
23 // and an animation frame task, so wait until after that. | |
24 setTimeout(requestAnimationFrame.bind(null, t.step_func_done()), 0); | |
25 }); | |
26 }); | |
27 </script> | |
OLD | NEW |