3 <meta http-equiv=
"content-type" content=
"text/html; charset=UTF-8">
4 <title>Search Field with Transform
</title>
5 <script src=
"resources/common.js"></script>
9 Test for
<a href=
"https://bugs.webkit.org/show_bug.cgi?id=22190">https://bugs.webkit.org/show_bug.cgi?id=
22190</a>:
<br>
10 Tests drawing and event handling on transformed search fields.
12 <p style=
"transform: translate(50px, 50px);">
13 <input type=
"search" id=
"target" results=
"5" value=
"Search me">
15 <p id=
"result" style=
"margin-top: 60px">
16 Clicking the (x) button should clear the field.
19 if (window
.testRunner
)
20 testRunner
.dumpAsText();
21 if (window
.eventSender
) {
22 var target
= document
.getElementById("target");
23 var translationAmount
= 50;
24 var cancelPos
= searchCancelButtonPosition(target
);
25 eventSender
.mouseMoveTo(cancelPos
.x
+ translationAmount
, cancelPos
.y
+ translationAmount
);
26 eventSender
.mouseDown();
27 eventSender
.mouseUp();
28 var result
= document
.getElementById("result");
29 if (target
.value
== "")
30 result
.innerText
= "PASS";
32 result
.innerText
= "FAIL";
34 target
.value
= "Some other text";