OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <html> | 2 <html> |
3 <head> | 3 <head> |
4 <script> | 4 <script> |
5 var runPixelTests = true; | 5 var runPixelTests = true; |
6 | 6 |
7 function init() { | 7 function init() { |
8 // Bail out early if the full screen API is not enabled or is mi
ssing: | 8 var iframe = document.getElementById('block1'); |
9 if (Element.prototype.webkitRequestFullScreen == undefined) { | 9 var element = iframe.contentDocument.documentElement; |
10 logResult(false, "Element.prototype.webkitRequestFullScreen
== undefined"); | 10 waitForEventAndEnd(element, 'webkitfullscreenchange'); |
11 endTest(); | 11 runWithKeyDown(goFullScreen); |
12 } else { | |
13 var iframe = document.getElementById('block1'); | |
14 var element = iframe.contentDocument.documentElement; | |
15 waitForEventAndEnd(element, 'webkitfullscreenchange'); | |
16 runWithKeyDown(goFullScreen); | |
17 } | |
18 } | 12 } |
19 | 13 |
20 function goFullScreen() { | 14 function goFullScreen() { |
21 var iframe = document.getElementById('block1'); | 15 var iframe = document.getElementById('block1'); |
22 var element = iframe.contentDocument.documentElement; | 16 var element = iframe.contentDocument.documentElement; |
23 element.webkitRequestFullScreen(); | 17 element.webkitRequestFullScreen(); |
24 } | 18 } |
25 </script> | 19 </script> |
26 <script src="full-screen-test.js"></script> | 20 <script src="full-screen-test.js"></script> |
27 <style> | 21 <style> |
(...skipping 17 matching lines...) Expand all Loading... |
45 </style> | 39 </style> |
46 </head> | 40 </head> |
47 <body onload="init()"> | 41 <body onload="init()"> |
48 <div>This tests that an element with a positive z-index appears behind t
he full screen element. | 42 <div>This tests that an element with a positive z-index appears behind t
he full screen element. |
49 After entering full screen mode, the whole screen should be white. | 43 After entering full screen mode, the whole screen should be white. |
50 Click <button onclick="goFullScreen()">go full screen</button> to r
un the test.</div> | 44 Click <button onclick="goFullScreen()">go full screen</button> to r
un the test.</div> |
51 <div id="block2"></div> | 45 <div id="block2"></div> |
52 <iframe allowfullscreen src="resources/empty.html" id="block1"></iframe> | 46 <iframe allowfullscreen src="resources/empty.html" id="block1"></iframe> |
53 </body> | 47 </body> |
54 </html> | 48 </html> |
OLD | NEW |