OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <html> | 2 <html> |
3 <body> | 3 <body> |
4 <p>This test passes if middle mouse clicking in the rectangle below does not cra
sh.</p> | 4 <p>This test passes if middle mouse clicking in the rectangle below does not cra
sh.</p> |
5 <iframe id="iframe" src='resources/selection-paste-crash.html'></iframe> | 5 <iframe id="iframe" src='resources/selection-paste-crash.html'></iframe> |
6 <script> | 6 <script> |
7 var iframe = document.getElementById("iframe"); | 7 var iframe = document.getElementById("iframe"); |
8 | 8 |
9 function removeIframe() | 9 function removeIframe() |
10 { | 10 { |
11 document.body.removeChild(iframe); | 11 document.body.removeChild(iframe); |
12 } | 12 } |
13 | 13 |
14 window.onload = function() { | 14 window.onload = function() { |
15 if (!window.testRunner || !window.eventSender) | 15 if (!window.testRunner || !window.eventSender) |
16 return; | 16 return; |
17 testRunner.dumpAsText(); | 17 testRunner.dumpAsText(); |
18 | 18 |
19 var x = iframe.offsetLeft + iframe.offsetWidth / 2; | 19 var x = iframe.offsetLeft + iframe.offsetWidth / 2; |
20 var y = iframe.offsetTop + iframe.offsetHeight / 2; | 20 var y = iframe.offsetTop + iframe.offsetHeight / 2; |
21 eventSender.mouseMoveTo(x, y); | 21 eventSender.mouseMoveTo(x, y); |
22 eventSender.mouseDown(1); | 22 eventSender.mouseDown(1); |
23 eventSender.mouseUp(1); | 23 eventSender.mouseUp(1); |
24 } | 24 } |
25 </script> | 25 </script> |
26 </body> | 26 </body> |
27 </html> | 27 </html> |
OLD | NEW |