| OLD | NEW |
| 1 <html xmlns='http://www.w3.org/1999/xhtml'> | 1 <html xmlns='http://www.w3.org/1999/xhtml'> |
| 2 <body style="margin: 0px; padding: 0px"> | 2 <body style="margin: 0px; padding: 0px"> |
| 3 <svg xmlns="http://www.w3.org/2000/svg" width="400" height="400" style="border:
solid"> | 3 <svg xmlns="http://www.w3.org/2000/svg" width="400" height="400" style="border:
solid"> |
| 4 <circle cx="350" cy="350" r="50" fill="green" onmousedown="startMove()"/> | 4 <circle cx="350" cy="350" r="50" fill="green" onmousedown="startMove()"/> |
| 5 <text x="200" y="50" text-anchor="middle">The circle should be in the middle
</text> | 5 <text x="200" y="50" text-anchor="middle">The circle should be in the middle
</text> |
| 6 </svg> | 6 </svg> |
| 7 <script> | 7 <script> |
| 8 var root = document.getElementsByTagName("svg")[0]; | 8 var root = document.getElementsByTagName("svg")[0]; |
| 9 var circle = document.getElementsByTagName("circle")[0]; | 9 var circle = document.getElementsByTagName("circle")[0]; |
| 10 | 10 |
| (...skipping 17 matching lines...) Expand all Loading... |
| 28 root.removeEventListener("mouseup", stopMove, false); | 28 root.removeEventListener("mouseup", stopMove, false); |
| 29 | 29 |
| 30 if (window.testRunner) | 30 if (window.testRunner) |
| 31 testRunner.notifyDone(); | 31 testRunner.notifyDone(); |
| 32 } | 32 } |
| 33 | 33 |
| 34 if (window.testRunner) | 34 if (window.testRunner) |
| 35 testRunner.waitUntilDone(); | 35 testRunner.waitUntilDone(); |
| 36 | 36 |
| 37 if (window.eventSender) { | 37 if (window.eventSender) { |
| 38 // Mouse events only work after an initial layout |
| 39 document.body.offsetLeft; |
| 38 eventSender.mouseMoveTo(350, 350); | 40 eventSender.mouseMoveTo(350, 350); |
| 39 eventSender.mouseDown(); | 41 eventSender.mouseDown(); |
| 40 eventSender.mouseMoveTo(200, 200); | 42 eventSender.mouseMoveTo(200, 200); |
| 41 eventSender.mouseUp(); | 43 eventSender.mouseUp(); |
| 42 } | 44 } |
| 43 </script> | 45 </script> |
| 44 </body> | 46 </body> |
| 45 </html> | 47 </html> |
| OLD | NEW |