Missing cursor/caret showing in search field on google.com
[WebKit-https.git] / LayoutTests / editing / selection / 4895428-1.html
1 <!DOCTYPE html>
2 <html>
3 <body>
4 <p id="description">This tests dragging a selected table by mousing down on the contents of one of its cells. It should be in the red bordered area.</p>
5 <div id="root">
6 <div id="source" style="border: 1px solid blue;" contenteditable="true"><table border="1"><tr><td id="cell">foo</td></tr></table></div>
7 <div id="destination" style="border: 1px solid red;" contenteditable="true"><br></div>
8 </div>
9
10 <script src="../../resources/dump-as-markup.js"></script>
11 <script>
12 function runTest() {
13     if (!window.testRunner)
14         return;
15         
16     var cell = document.getElementById("cell");
17     var source = document.getElementById("source");
18     source.focus();
19     document.execCommand("SelectAll");
20
21     var x, y;
22     x = cell.offsetParent.offsetLeft + cell.offsetLeft + cell.offsetWidth / 2;
23     y = cell.offsetParent.offsetTop + cell.offsetTop + cell.offsetHeight / 2;
24     eventSender.mouseMoveTo(x, y);
25     eventSender.mouseDown();
26     eventSender.leapForward(1000);
27     
28     var destination = document.getElementById("destination");
29     x = destination.offsetParent.offsetLeft + destination.offsetLeft + destination.offsetWidth / 2;
30     y = destination.offsetParent.offsetTop + destination.offsetTop + destination.offsetHeight / 2;
31     
32     eventSender.mouseMoveTo(x, y);
33     eventSender.mouseUp();
34     Markup.description(description.textContent);
35     Markup.dump(root);
36 }
37
38 runTest();
39 </script>
40 </body>
41 </html>