Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / events / scroll-div-with-prevent-default-in-subframe.html
blob67a2322cb84e6f83224a3a85e5cef4b5ae0df832
1 <html><body onload="scroll()">
2 <script>
3 function scroll() {
4 if (window.eventSender) {
5 var scrollbar = document.getElementById("subframe").contentDocument.getElementById('scrollable');
7 var startX = scrollbar.offsetLeft + scrollbar.offsetWidth - 5;
8 var startY = scrollbar.offsetTop + 200;
10 eventSender.mouseMoveTo(startX, startY - 100);
11 eventSender.mouseDown();
12 eventSender.mouseMoveTo(startX, startY);
13 eventSender.mouseUp();
15 eventSender.mouseDown();
16 eventSender.mouseMoveTo(startX, startY + 200);
17 eventSender.mouseMoveTo(startX + 200, startY + 200);
18 eventSender.mouseUp();
19 var scrollAfterMoveToMainFrame = scrollbar.scrollTop;
21 eventSender.mouseMoveTo(startX - 100, startY - 100);
22 var scrollAfterReturnToSubframe = scrollbar.scrollTop;
23 var result = scrollAfterMoveToMainFrame == scrollAfterReturnToSubframe ? "PASS"
24 : "FAIL: scrollAfterMoveToMainFrame = " + scrollAfterMoveToMainFrame + ", scrollAfterReturnToSubframe = " + scrollAfterReturnToSubframe;
25 document.getElementById("console").appendChild(document.createTextNode(result));
26 testRunner.notifyDone();
30 if (window.testRunner) {
31 testRunner.dumpAsText();
32 testRunner.waitUntilDone();
34 </script>
35 <div id="console"></div>
36 <iframe id="subframe" width="500px" height="350" scrolling="no" marginwidth="0" marginheight="0" src="resources/subframe-with-scrollable-div.html"></iframe>
37 <br>This test does the following via EventSender:<br>
38 1. Click and drag the div scrollbar to a middle point.<br>
39 2. Click and drag again, this time down and to right, with the mouseup occurring in a parent frame.<br>
40 3. Move the mouse back into the div with the scrollbar.<br>
41 Per https://bugs.webkit.org/show_bug.cgi?id=73097, because the div with the scrollbar had a mousedown event that called preventDefault(),
42 the mouse moves would not properly be handled by the scrollbar. We pass if the div's scrollTop property is the same after all 3 steps.
43 </body></html>