[WK2] selection does not disappear after coping the text
[framework/web/webkit-efl.git] / LayoutTests / fast / forms / search-abs-pos-cancel-button.html
1 <html>
2 <head>
3     <title>Search Field with Transform</title>
4     <script src="resources/common.js"></script>
5     <script type="text/javascript" charset="utf-8">
6       if (window.layoutTestController)
7         layoutTestController.dumpAsText();
8     </script>
9 </head>
10 <body>
11     <p>
12         Test for <a href="https://bugs.webkit.org/show_bug.cgi?id=24503">https://bugs.webkit.org/show_bug.cgi?id=24503</a>:<br>
13         Can't click the clear button of an absolutely positioned search field.
14     </p>
15     <input type="search" id="target" results="5" value="Search me" style="position: absolute; left: 50px; top: 50px;">
16     <p id="result" style="margin-top: 60px;">
17         Clicking the (x) button should clear the field.
18     </p>
19     <script>
20         if (window.eventSender) {
21             var target = document.getElementById("target");
22             var cancelPos = searchCancelButtonPosition(target);
23             eventSender.mouseMoveTo(cancelPos.x, cancelPos.y);
24             eventSender.mouseDown();
25             eventSender.mouseUp();
26             var result = document.getElementById("result");
27             if (target.value == "")
28                 result.innerText = "PASS";
29             else
30                 result.innerText = "FAIL";
31             
32             target.value = "Some other text";
33         }
34     </script>
35 </body>
36 </html>