Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(16)

Side by Side Diff: third_party/WebKit/LayoutTests/fast/events/autoscroll-scrollable-iframe-div.html

Issue 1461473002: Ensure that the auto scroll state in the AutoscrollController is cleared if the scroll operation cl… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Another attempt to fix layout test redness Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/fast/events/autoscroll-scrollable-iframe-div-expected.txt » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <script src="../../resources/js-test.js"> </script>
3 <script>
4 var button_was_clicked = false;
5
6 function test() {
7 if (window.testRunner) {
8 testRunner.waitUntilDone();
9 testRunner.dumpAsText();
10 testRunner.layoutAndPaintAsyncThen(
11 function() {
12 var iframe = document.getElementById('ScrollIFrame');
13 var iframeDocument = iframe.contentDocument;
14 var textInIFrame = iframeDocument.getElementById('textInFrame');
15 if (window.eventSender) {
16 debug("Starting Autoscroll test on iframe");
17 testRunner.layoutAndPaintAsyncThen(
18 function() {
19 var x = iframe.offsetLeft + textInIFrame.offsetLeft + 7;
20 var y = iframe.offsetTop + textInIFrame.offsetTop + 7;
21 eventSender.dragMode = false;
22 eventSender.mouseMoveTo(x, y);
23 eventSender.mouseDown(1);
24 eventSender.mouseMoveTo(x + 220, y + 220);
25 eventSender.mouseUp(1);
26 testRunner.layoutAndPaintAsyncThen(autoscrollTestPar t2);
27 });
28 }
29 });
30 }
31 }
32
33 function autoscrollTestPart2() {
34 if (!window.eventSender)
35 return;
36 var testCompleted = document.getElementById("testCompletedButton");
37 var h = testCompleted.offsetTop - document.scrollingElement.scrollTop + 10;
38 eventSender.dragMode = false;
39 eventSender.mouseMoveTo(20, testCompleted.offsetTop);
40 eventSender.mouseDown();
41 eventSender.mouseUp();
42 testRunner.runAfterLayoutAndPaint(checkButtonClicked);
43 }
44
45 function checkButtonClicked() {
46 if (!button_was_clicked) {
47 debug("FAILED : the autoscroll has failed !");
48 if (window.testRunner)
49 testRunner.notifyDone();
50 }
51 }
52
53 function testCompleted() {
54 button_was_clicked = true;
55 debug("PASSED : the autoscroll has worked !");
56 if (window.testRunner)
57 testRunner.notifyDone();
58 }
59 </script>
60
61 <body onload="test()">
62 <p>Test for <a href="http://crbug.com/336373">bug 336373</a>.</p>
63 <p>To test manually, hold the middle mouse button on the box with scrollbars and scroll by dragging the mouse outside the bounds of the box. If the bug occu rs once the cursor leaves the bounds of the box it will remain stuck in the pann ing state.</p>
64
65 <div id="ScrollableIFrameDiv" style="height: 100px; width: 100px">
66 <iframe id="ScrollIFrame" src="resources/iframe-with-overflow-scrollable -div.html" style="height: 100px; width: 100px">
67 </iframe>
68 </div>
69
70 <button id="testCompletedButton" type="button" onclick="testCompleted()"> Cl ick me </button>
71 </body>
72 </html>
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/fast/events/autoscroll-scrollable-iframe-div-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698