OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <html> | 2 <html> |
3 <script src="full-screen-test.js"></script> | 3 <script src="full-screen-test.js"></script> |
4 <body onload="init()"> | 4 <body onload="init()"> |
5 <p>Test passes if it does not crash.</p> | 5 <p>Test passes if it does not crash.</p> |
6 <div id="div1"> | 6 <div id="div1"> |
7 <script> | 7 <script> |
8 var init = function() { | 8 var init = function() { |
9 // Bail out early if the full screen API is not enabled or is missing: | 9 runWithKeyDown(function() { div1.webkitRequestFullScreen() }); |
10 if (Element.prototype.webkitRequestFullScreen == undefined) { | |
11 logResult(false, "Element.prototype.webkitRequestFullScreen == undefined
"); | |
12 endTest(); | |
13 } else { | |
14 runWithKeyDown(function() { div1.webkitRequestFullScreen() }); | |
15 } | |
16 | 10 |
17 frameset1 = document.createElementNS("http://www.w3.org/1999/xhtml", "frames
et"); | 11 frameset1 = document.createElementNS("http://www.w3.org/1999/xhtml", "frames
et"); |
18 document.body.appendChild(frameset1); | 12 document.body.appendChild(frameset1); |
19 setTimeout("crash()", 0); | 13 setTimeout("crash()", 0); |
20 }; | 14 }; |
21 | 15 |
22 function crash() { | 16 function crash() { |
23 frameset1.appendChild(div1); | 17 frameset1.appendChild(div1); |
24 if (window.eventSender) | 18 if (window.eventSender) |
25 eventSender.keyDown("X"); | 19 eventSender.keyDown("X"); |
26 endTest(); | 20 endTest(); |
27 } | 21 } |
28 </script> | 22 </script> |
29 </html> | 23 </html> |
OLD | NEW |