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 <g> | 4 <g> |
5 <circle cx="350" cy="350" r="50" fill="green" onmousedown="startMove()"/
> | 5 <circle cx="350" cy="350" r="50" fill="green" onmousedown="startMove()"/
> |
6 </g> | 6 </g> |
7 <text x="200" y="50" text-anchor="middle">The circle should stay in the bott
om-right corner</text> | 7 <text x="200" y="50" text-anchor="middle">The circle should stay in the bott
om-right corner</text> |
8 </svg> | 8 </svg> |
9 <script> | 9 <script> |
10 var root = document.getElementsByTagName("svg")[0]; | 10 var root = document.getElementsByTagName("svg")[0]; |
(...skipping 20 matching lines...) Expand all Loading... |
31 root.removeEventListener("mouseup", stopMove, false); | 31 root.removeEventListener("mouseup", stopMove, false); |
32 | 32 |
33 if (window.testRunner) | 33 if (window.testRunner) |
34 testRunner.notifyDone(); | 34 testRunner.notifyDone(); |
35 } | 35 } |
36 | 36 |
37 if (window.testRunner) | 37 if (window.testRunner) |
38 testRunner.waitUntilDone(); | 38 testRunner.waitUntilDone(); |
39 | 39 |
40 if (window.eventSender) { | 40 if (window.eventSender) { |
41 // Mouse events only work after an initial layout | |
42 document.body.offsetLeft; | |
43 eventSender.mouseMoveTo(350, 350); | 41 eventSender.mouseMoveTo(350, 350); |
44 eventSender.mouseDown(); | 42 eventSender.mouseDown(); |
45 eventSender.mouseMoveTo(200, 200); | 43 eventSender.mouseMoveTo(200, 200); |
46 eventSender.mouseUp(); | 44 eventSender.mouseUp(); |
47 } | 45 } |
48 </script> | 46 </script> |
49 </body> | 47 </body> |
50 </html> | 48 </html> |
OLD | NEW |