Upstream version 7.36.149.0
[platform/framework/web/crosswalk.git] / src / third_party / WebKit / LayoutTests / plugins / change-widget-and-click-crash.html
1 <html>
2 <script>
3 function clickElement(element) {
4     if (window.eventSender) {
5         var centerX = element.offsetLeft + element.offsetWidth / 2;
6         var centerY = element.offsetTop + element.offsetHeight / 2;
7         eventSender.mouseMoveTo(centerX, centerY);
8         eventSender.mouseDown();
9     }
10 }
11
12 function crash() {
13     var x = document.getElementById('x');
14     x.setAttribute('data', x.data);
15     clickElement(x);
16     document.body.innerHTML = "PASS";
17
18     if (window.testRunner)
19         testRunner.notifyDone();
20 }
21
22 function load() {
23     if (window.testRunner) {
24         testRunner.dumpAsText();
25         testRunner.waitUntilDone();
26     }
27     setTimeout(crash, 0);
28 }
29 </script>
30 <body onload="load()">
31     <object id="x" data="x" border="1" type="application/x-webkit-test-netscape">
32         <param name="wmode" value="transparent">
33     </object>
34 </body>
35 </html>