OLD | NEW |
| (Empty) |
1 <!DOCTYPE html> | |
2 <title>Document.fullscreenElement</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 <script> | |
8 async_test(function(t) | |
9 { | |
10 var div = document.querySelector("div"); | |
11 | |
12 document.onfullscreenchange = t.step_func(function() | |
13 { | |
14 assert_equals(document.fullscreenElement, div, "fullscreenElement before
exitFullscreen()"); | |
15 document.exitFullscreen(); | |
16 // TODO(foolip): fullscreenElement should still be div. | |
17 // https://crbug.com/402421 | |
18 assert_equals(document.fullscreenElement, null, "fullscreenElement after
exitFullscreen()"); | |
19 | |
20 document.onfullscreenchange = t.step_func(function() | |
21 { | |
22 assert_equals(document.fullscreenElement, null, "fullscreenElement a
fter exiting fullscreen"); | |
23 t.done(); | |
24 }); | |
25 }); | |
26 | |
27 trusted_click(t.step_func(function() | |
28 { | |
29 assert_equals(document.fullscreenElement, null, "fullscreenElement befor
e requestFullscreen()"); | |
30 div.requestFullscreen(); | |
31 // TODO(foolip): fullscreenElement should still be null. | |
32 // https://crbug.com/402421 | |
33 assert_equals(document.fullscreenElement, div, "fullscreenElement after
requestFullscreen()"); | |
34 }), document.body); | |
35 }); | |
36 </script> | |
OLD | NEW |