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 deleteSlider()
26 log("<br>deleting slider");
27 var slider
= document
.getElementById('slider');
28 slider
.parentNode
.removeChild(slider
);
30 setTimeout(buttonClick
, 10);
35 if (!window
.testRunner
)
38 var slider
= document
.getElementById('slider');
40 testRunner
.dumpAsText();
41 testRunner
.waitUntilDone();
43 // drag slider, leave the mouse down
44 log("dragging slider");
45 eventSender
.mouseMoveTo(slider
.offsetLeft
+ 7, slider
.offsetTop
+ 7);
46 eventSender
.mouseDown();
47 eventSender
.mouseMoveTo(slider
.offsetLeft
+ 50, slider
.offsetTop
+ 7);
49 setTimeout(deleteSlider
, 10);
53 <body onload=
"drag()">
54 This tests that events don't continue to target a slider thumb if it is deleted while dragging.
56 <input type=
"button" id=
"button" value=
"Click Me!" onmouseup=
"log('button click!')">
58 <input type=
"range" id=
"slider" onmousedown=
"log('mousedown')" onmouseup=
"log('mouseup')" onmousemove=
"log('mousemove')" oninput=
"log('input')" value=
0>
59 <div id=
"console"></div>