3 <body onload=
"runTest()">
5 function focusAndSetDisplayNone() {
6 var ta
= document
.getElementById("ta");
8 ta
.style
.display
= "none";
11 function getPositionOfNode(id
)
13 var n
= document
.getElementById(id
);
14 var pos
= {x
: 0, y
: 0};
17 pos
.x
+= n
.offsetLeft
+ n
.clientLeft
;
18 pos
.y
+= n
.offsetTop
+ n
.clientTop
;
25 if (window
.testRunner
) {
26 testRunner
.dumpAsText()
27 var pos
= getPositionOfNode("clickTarget");
28 // Repeat the test for better reproducability
30 for (i
=0; i
<10; ++i
) {
31 document
.getElementById("ta").style
.display
="";
32 eventSender
.mouseMoveTo(pos
.x
+ 5, pos
.y
+ 5);
33 eventSender
.mouseDown();
34 eventSender
.mouseUp();
39 <textarea id=
"ta">a
</textarea>
40 <span onclick=
"focusAndSetDisplayNone()" id=
"clickTarget">Click me
</span><br>
41 To run manually, click the 'Click me' text. Test passes if it does not crash.