tizen beta release
[framework/web/webkit-efl.git] / LayoutTests / fast / overflow / overflow-text-hit-testing.html
1 <html>
2 <head>
3     <title>Hit-testing text in overflows</title>
4 <script type="text/javascript">
5 var target;
6
7 if (window.layoutTestController)
8     layoutTestController.waitUntilDone();
9
10 function step3()
11 {
12     eventSender.mouseUp();
13     layoutTestController.notifyDone();
14 }
15
16 function step2()
17 {
18     eventSender.mouseDown();
19     window.setTimeout(step3, 1);
20 }
21
22 function step1()
23 {
24     target.scrollLeft = 3000;
25     if (window.layoutTestController) {
26         eventSender.mouseMoveTo(205, 10);
27         window.setTimeout(step2, 1);
28     }
29 }
30
31 function test()
32 {
33     target = document.getElementById("target");
34     window.setTimeout(step1, 1);
35 }
36 </script>
37 </head>
38 <body style="margin: 0; padding: 0;" onload="test();">
39     <div id="target" style="overflow: auto; width: 210px; white-space: pre;">Seals and caribou live in the arctic, too</div>
40     <hr>
41     <p>
42         This tests for regressions against
43         <i>http://bugzilla.opendarwin.org/show_bug.cgi?id=5921 Hit-testing text
44         in overflows does not take scrolling into account</i> by scrolling
45         the above text all the way to the right, clicking the last letter, and
46         verifying that the correct caret position is reported to the editing
47         delegate.
48     </p>
49 </body>