OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <html> | 2 <html> |
3 <body> | 3 <body> |
4 <div>a<span>b<div>c</div>d</span>e</div> | 4 <div>a<span>b<div>c</div>d</span>e</div> |
5 <script> | 5 <script> |
6 // This test turns fullscreen on and off quickly, | 6 // This test turns fullscreen on and off quickly, |
7 // then see if it renderes just like as before. | 7 // then see if it renderes just like as before. |
8 if ("webkitRequestFullScreen" in Element.prototype) { | 8 if (window.testRunner) |
9 if (window.testRunner) | 9 testRunner.waitUntilDone(); |
10 testRunner.waitUntilDone(); | 10 document.body.offsetTop; |
11 document.body.offsetTop; | 11 var span = document.getElementsByTagName('span')[0]; |
12 var span = document.getElementsByTagName('span')[0]; | |
13 | 12 |
14 var fullscreenChangeEvent = function(event) { | 13 var fullscreenChangeEvent = function(event) { |
15 if (document.webkitIsFullScreen) { | 14 if (document.webkitIsFullScreen) { |
16 setTimeout(function () { | 15 setTimeout(function () { |
17 document.webkitCancelFullScreen(); | 16 document.webkitCancelFullScreen(); |
18 }, 0); | 17 }, 0); |
19 } else { | 18 } else { |
20 if (window.testRunner) | 19 if (window.testRunner) |
21 testRunner.notifyDone(); | 20 testRunner.notifyDone(); |
22 } | 21 } |
23 }; | 22 }; |
24 | 23 |
25 document.addEventListener('webkitfullscreenchange', fullscreenChangeEven
t); | 24 document.addEventListener('webkitfullscreenchange', fullscreenChangeEvent); |
26 | 25 |
27 document.addEventListener('keydown', function () { | 26 document.addEventListener('keydown', function () { |
28 span.webkitRequestFullScreen(); | 27 span.webkitRequestFullScreen(); |
29 }); | 28 }); |
30 if (window.eventSender) | 29 if (window.eventSender) |
31 eventSender.keyDown('a'); | 30 eventSender.keyDown('a'); |
32 } | |
33 </script> | 31 </script> |
34 </body> | 32 </body> |
35 </html> | 33 </html> |
OLD | NEW |