Video is not started even if play button has been pressed.
[framework/web/webkit-efl.git] / LayoutTests / fast / events / device-orientation-crash.html
1 <html>\r
2 <script>\r
3 var frame;\r
4 \r
5 if (!window.gc) {\r
6     window.gc = function() {\r
7         if (window.GCController)\r
8             return GCController.collect();\r
9         for (var i = 0; i < 10000; i++) {\r
10             var s = new String("abc");\r
11         }\r
12     }\r
13 }\r
14 \r
15 function done() {\r
16     document.body.innerHTML = 'PASS: handler not supported or did not crash when removing Windows during ondeviceorientation event';\r
17     if (window.testRunner)\r
18         testRunner.notifyDone();\r
19 }\r
20 \r
21 function remove() {\r
22     frame = null;\r
23     document.body.innerHTML = '';\r
24     gc();\r
25     setTimeout(done, 0);\r
26 }\r
27 \r
28 function crash() {\r
29     if (window.testRunner) {\r
30         testRunner.dumpAsText();\r
31         testRunner.waitUntilDone();\r
32     }\r
33 \r
34     frame = document.createElement('iframe');\r
35     document.body.appendChild(frame);\r
36 \r
37     if (!frame.contentWindow.ondeviceorientation)\r
38         done();\r
39     else\r
40         frame.contentWindow.ondeviceorientation = remove;\r
41 }\r
42 </script>\r
43 <body onload="crash()">\r
44 </body>\r
45 </html>\r