Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 <!doctype html> | |
| 2 <html> | |
| 3 <head> | |
|
esprehn
2015/09/24 20:17:01
leave out html, body
dsinclair
2015/09/28 17:14:57
Done.
| |
| 4 <style> | |
| 5 div { | |
| 6 top: 100px; | |
| 7 bottom: 100px; | |
| 8 left: 100px; | |
| 9 right: 100px; | |
| 10 height: auto; | |
| 11 width: auto; | |
| 12 } | |
| 13 ::backdrop { | |
| 14 background: green; | |
| 15 } | |
| 16 </style> | |
| 17 </head> | |
| 18 <body> | |
| 19 <div>Test that fullscreen elements are in the top layer. The test passes if you see a green backdrop behind this box when fullscreen.</div> | |
| 20 <button>Go fullscreen</button> | |
| 21 <script> | |
| 22 div = document.querySelector('div'); | |
|
esprehn
2015/09/24 20:17:01
Lets use an id instead so the test is clear (and l
dsinclair
2015/09/28 17:14:57
Done.
| |
| 23 document.querySelector('button').addEventListener('click', function() { | |
| 24 div.webkitRequestFullscreen(); | |
| 25 }); | |
| 26 if (window.testRunner) { | |
| 27 testRunner.waitUntilDone(); | |
| 28 document.addEventListener('webkitfullscreenchange', function() { | |
| 29 setTimeout(function() { | |
|
esprehn
2015/09/24 20:17:01
requestAnimationFrame? I'm not sure what you're wa
dsinclair
2015/09/28 17:14:57
Done.
| |
| 30 testRunner.notifyDone(); | |
| 31 }, 0); | |
| 32 }); | |
| 33 document.addEventListener('keydown', function() { div.webkitRequestFullscree n(); }); | |
|
esprehn
2015/09/24 20:17:01
on a new line
dsinclair
2015/09/28 17:14:57
Done.
| |
| 34 eventSender.keyDown('a'); | |
|
esprehn
2015/09/24 20:17:01
simulate a click instead, having both the keydown
dsinclair
2015/09/28 17:14:57
Done.
| |
| 35 } | |
| 36 </script> | |
| 37 </body> | |
| 38 </html> | |
| OLD | NEW |