| 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 var iframe = document.getElementById('block1'); | 8 var iframe = document.getElementById('block1'); |
| 9 var element = iframe.contentDocument.documentElement; | 9 var element = iframe.contentDocument.documentElement; |
| 10 waitForEventAndEnd(element, 'webkitfullscreenchange'); | 10 waitForEventAndEnd(element, 'webkitfullscreenchange'); |
| 11 runWithKeyDown(goFullScreen); | 11 runWithKeyDown(goFullScreen); |
| 12 } | 12 } |
| 13 | 13 |
| 14 function goFullScreen() { | 14 function goFullScreen() { |
| 15 var iframe = document.getElementById('block1'); | 15 var iframe = document.getElementById('block1'); |
| 16 var element = iframe.contentDocument.documentElement; | 16 var element = iframe.contentDocument.documentElement; |
| 17 element.webkitRequestFullScreen(); | 17 element.webkitRequestFullScreen(); |
| 18 } | 18 } |
| 19 </script> | 19 </script> |
| 20 <script src="full-screen-test.js"></script> | 20 <script src="full-screen-test.js"></script> |
| 21 <style> | 21 <style> |
| 22 #block1 { | 22 #block1 { |
| 23 width: 200px; | 23 width: 200px; |
| 24 height: 100px; | 24 height: 100px; |
| 25 border: 4px solid darkgreen; | 25 border: 4px solid darkgreen; |
| 26 background-color: green; | |
| 27 z-index: 0; | 26 z-index: 0; |
| 28 } | 27 } |
| 29 #block2 { | 28 #block2 { |
| 30 width: 100px; | 29 width: 100px; |
| 31 height: 50px; | 30 height: 50px; |
| 32 border: 4px solid darkred; | 31 border: 4px solid darkred; |
| 33 background-color: red; | 32 background-color: red; |
| 34 z-index: 500; | 33 z-index: 500; |
| 35 position: relative; | 34 position: relative; |
| 36 left: 50px; | 35 left: 50px; |
| 37 top: 25px; | 36 top: 25px; |
| 38 } | 37 } |
| 39 </style> | 38 </style> |
| 40 </head> | 39 </head> |
| 41 <body onload="init()"> | 40 <body onload="init()"> |
| 42 <div>This tests that an element with a positive z-index appears behind t
he full screen element. | 41 <div>This tests that an element with a positive z-index appears behind t
he full screen element. |
| 43 After entering full screen mode, the whole screen should be white. | 42 After entering full screen mode, only a green box should be visible
. |
| 44 Click <button onclick="goFullScreen()">go full screen</button> to r
un the test.</div> | 43 Click <button onclick="goFullScreen()">go full screen</button> to r
un the test.</div> |
| 45 <div id="block2"></div> | 44 <div id="block2"></div> |
| 46 <iframe allowfullscreen src="resources/empty.html" id="block1"></iframe> | 45 <iframe allowfullscreen src="resources/green.html" id="block1"></iframe> |
| 47 </body> | 46 </body> |
| 48 </html> | 47 </html> |
| OLD | NEW |