Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / events / selectstart-during-autoscroll.html
blob7c369150d6dd9bb73edeec21eb4ea53e1212177e
1 <html>
2 <head>
3 <title></title>
4 <script type="text/javascript">
5 if (window.testRunner) {
6 testRunner.dumpAsText();
7 testRunner.dumpEditingCallbacks();
10 function kill_event(event)
12 event.preventDefault();
15 var y;
16 var x1;
17 var x2;
19 function finish()
21 eventSender.mouseMoveTo(x2, y);
22 eventSender.mouseUp();
24 var result = document.getElementById("result");
25 result.innerText = getSelection().baseNode ? "FAIL" : "PASS";
27 testRunner.notifyDone();
30 function test()
32 if (!window.eventSender)
33 return;
35 testRunner.waitUntilDone();
37 var target = document.getElementById("target");
38 y = target.offsetTop + target.offsetHeight / 2;
39 x1 = target.offsetLeft + 10;
40 x2 = x1 + 100;
42 eventSender.dragMode = false;
43 eventSender.mouseMoveTo(x1, y);
44 eventSender.mouseDown();
45 // Get the autoscroll timer started
46 eventSender.mouseMoveTo(x1, y);
48 // Wait the autoscroll timer interval
49 setTimeout(finish, 100);
52 addEventListener("selectstart", kill_event, true);
53 </script>
54 </head>
55 <body onload="test()">
56 <p>
57 Test for <i><a href="http://bugs.webkit.org/show_bug.cgi?id=12823">http://bugs.webkit.org/show_bug.cgi?id=12823</a>
58 REGRESSION(r16968-16977): unable to prevent selection by cancelling "selectstart" event</i>.
59 </p>
60 <p id="target">
61 You should not be able to select this text by clicking or dragging across it.
62 </p>
63 <p id="result">
64 </p>
65 </body>
66 </html>