6 var console
= document
.getElementById('console');
7 console
.innerHTML
= console
.innerHTML
+ msg
+ "<br>";
10 function buttonClick()
12 log("<br>clicking button");
15 var button
= document
.getElementById('button');
16 eventSender
.mouseMoveTo(button
.offsetLeft
+ 20, button
.offsetTop
+ 7);
17 eventSender
.mouseDown();
18 eventSender
.mouseUp();
20 testRunner
.notifyDone();
23 function deleteSearch()
26 log("<br>deleting search input");
27 var search
= document
.getElementById('search');
28 search
.parentNode
.removeChild(search
);
30 setTimeout(buttonClick
, 10);
35 if (!window
.testRunner
)
38 testRunner
.dumpAsText();
39 testRunner
.waitUntilDone();
41 var search
= document
.getElementById('search');
42 var x
= search
.offsetLeft
+ search
.offsetWidth
- 6;
43 var y
= search
.offsetTop
+ search
.offsetHeight
/ 2;
45 // drag slider, leave the mouse down
46 log("clicking in cancel");
47 eventSender
.mouseMoveTo(x
, y
);
48 eventSender
.mouseDown();
50 setTimeout(deleteSearch
, 10);
54 <body onload=
"drag()">
55 This tests that events don't continue to target a search cancel button if it is deleted while mouse is down.
57 <input type=
"button" id=
"button" value=
"Click Me!" onmouseup=
"log('button click!')">
59 <input id=
"search" type=
"search" value=
"foo">
60 <div id=
"console"></div>