4 <script src=
"resources/common.js"></script>
8 if (!window
.testRunner
)
11 testRunner
.dumpAsText();
13 var s1
= document
.getElementById("search1");
14 var s2
= document
.getElementById("search2");
15 var s3
= document
.getElementById("search3");
17 var s1cancelPos
= searchCancelButtonPosition(s1
);
18 var buttonX
= s1cancelPos
.x
;
19 var middleX
= s1
.offsetLeft
+ s1
.offsetWidth
/ 2;
21 var y2
= s2
.offsetTop
+ s2
.offsetHeight
/ 2;
22 var y3
= s3
.offsetTop
+ s3
.offsetHeight
/ 2;
24 eventSender
.mouseMoveTo(buttonX
, s1cancelPos
.y
);
25 eventSender
.mouseDown();
26 eventSender
.mouseMoveTo(middleX
, s1cancelPos
.y
);
27 eventSender
.mouseUp();
28 eventSender
.leapForward(1000);
30 eventSender
.mouseMoveTo(middleX
, y2
);
31 eventSender
.mouseDown();
32 eventSender
.mouseMoveTo(buttonX
, y2
);
33 eventSender
.mouseUp();
34 eventSender
.leapForward(1000);
36 eventSender
.mouseMoveTo(buttonX
, y3
);
37 eventSender
.mouseDown();
38 eventSender
.mouseMoveTo(buttonX
, y3
);
39 eventSender
.mouseUp();
41 var result
= document
.getElementById("result");
42 var values
= s1
.value
+ ", " + s2
.value
+ ", " + s3
.value
;
43 if (values
== "foo, bar, ")
44 result
.innerText
= "PASS";
46 result
.innerText
= "FAIL (" + values
+ ")";
50 <body onload=
"test()">
52 Test for
<i><a href=
"http://bugs.webkit.org/show_bug.cgi?id=12618">http://bugs.webkit.org/show_bug.cgi?id=
12618</a>
53 REGRESSION (SearchField): Dragging across the text and releasing over the clear button clears the field
</i>.
56 Cannot run interactively.
58 <input id=
"search1" type=
"search" value=
"foo">
60 <input id=
"search2" type=
"search" value=
"bar">
62 <input id=
"search3" type=
"search" value=
"baz">