Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / overflow / overflow-text-hit-testing.html
blob7ac0c844b5516aba95431b794634867a986a7133
1 <html>
2 <head>
3 <title>Hit-testing text in overflows</title>
4 <script type="text/javascript">
5 var target;
7 if (window.testRunner)
8 testRunner.waitUntilDone();
10 function step3()
12 eventSender.mouseUp();
13 testRunner.notifyDone();
16 function step2()
18 eventSender.mouseDown();
19 window.setTimeout(step3, 1);
22 function step1()
24 target.scrollLeft = 3000;
25 if (window.testRunner) {
26 eventSender.mouseMoveTo(205, 10);
27 window.setTimeout(step2, 1);
31 function test()
33 target = document.getElementById("target");
34 window.setTimeout(step1, 1);
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>