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-event.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 // FIXME: per spec fullscreenElement should still be div |
| 17 assert_equals(document.fullscreenElement, null, "fullscreenElement after
exitFullscreen()"); |
| 18 |
| 19 document.onfullscreenchange = t.step_func(function() |
| 20 { |
| 21 assert_equals(document.fullscreenElement, null, "fullscreenElement a
fter exiting fullscreen"); |
| 22 t.done(); |
| 23 }); |
| 24 }); |
| 25 |
| 26 trusted_event(t.step_func(function() |
| 27 { |
| 28 assert_equals(document.fullscreenElement, null, "fullscreenElement befor
e requestFullscreen()"); |
| 29 div.requestFullscreen(); |
| 30 // FIXME: per spec fullscreenElement should still be null |
| 31 assert_equals(document.fullscreenElement, div, "fullscreenElement after
requestFullscreen()"); |
| 32 }), document.body); |
| 33 }); |
| 34 </script> |
OLD | NEW |