OLD | NEW |
1 <body> | 1 <body> |
2 <script src="full-screen-test.js"></script> | 2 <script src="full-screen-test.js"></script> |
3 <div id="one"> | 3 <div id="one"> |
4 <div id="fullscreen"></div> | 4 <div id="fullscreen"></div> |
5 <div id="two"><span></span></div> | 5 <div id="two"><span></span></div> |
6 </div> | 6 </div> |
7 | 7 |
8 <script> | 8 <script> |
9 // Bail out early if the full screen API is not enabled or is missing: | |
10 if (Element.prototype.webkitRequestFullScreen == undefined) { | |
11 logResult(false, "Element.prototype.webkitRequestFullScreen == undefined"); | |
12 endTest(); | |
13 } else { | |
14 var callback; | 9 var callback; |
15 waitForEvent(document, 'webkitfullscreenchange', function() { | 10 waitForEvent(document, 'webkitfullscreenchange', function() { |
16 var one = document.getElementById('one'); | 11 var one = document.getElementById('one'); |
17 var two = document.getElementById('two'); | 12 var two = document.getElementById('two'); |
18 one.removeChild(two); | 13 one.removeChild(two); |
19 endTest(); | 14 endTest(); |
20 }); | 15 }); |
21 | 16 |
22 function goFullScreen() { | 17 function goFullScreen() { |
23 document.getElementById('fullscreen').webkitRequestFullScreen(); | 18 document.getElementById('fullscreen').webkitRequestFullScreen(); |
24 } | 19 } |
25 runWithKeyDown(goFullScreen); | 20 runWithKeyDown(goFullScreen); |
26 } | |
27 </script> | 21 </script> |
OLD | NEW |