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

Unified 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 side-by-side diff with in-line comments
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 »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/fast/events/autoscroll-scrollable-iframe-div.html
diff --git a/third_party/WebKit/LayoutTests/fast/events/autoscroll-scrollable-iframe-div.html b/third_party/WebKit/LayoutTests/fast/events/autoscroll-scrollable-iframe-div.html
new file mode 100644
index 0000000000000000000000000000000000000000..4f81b02d57175ba80f54422716ef319fd6673357
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/fast/events/autoscroll-scrollable-iframe-div.html
@@ -0,0 +1,72 @@
+<!DOCTYPE html>
+<script src="../../resources/js-test.js"> </script>
+<script>
+var button_was_clicked = false;
+
+function test() {
+ if (window.testRunner) {
+ testRunner.waitUntilDone();
+ testRunner.dumpAsText();
+ testRunner.layoutAndPaintAsyncThen(
+ function() {
+ var iframe = document.getElementById('ScrollIFrame');
+ var iframeDocument = iframe.contentDocument;
+ var textInIFrame = iframeDocument.getElementById('textInFrame');
+ if (window.eventSender) {
+ debug("Starting Autoscroll test on iframe");
+ testRunner.layoutAndPaintAsyncThen(
+ function() {
+ var x = iframe.offsetLeft + textInIFrame.offsetLeft + 7;
+ var y = iframe.offsetTop + textInIFrame.offsetTop + 7;
+ eventSender.dragMode = false;
+ eventSender.mouseMoveTo(x, y);
+ eventSender.mouseDown(1);
+ eventSender.mouseMoveTo(x + 220, y + 220);
+ eventSender.mouseUp(1);
+ testRunner.layoutAndPaintAsyncThen(autoscrollTestPart2);
+ });
+ }
+ });
+ }
+}
+
+function autoscrollTestPart2() {
+ if (!window.eventSender)
+ return;
+ var testCompleted = document.getElementById("testCompletedButton");
+ var h = testCompleted.offsetTop - document.scrollingElement.scrollTop + 10;
+ eventSender.dragMode = false;
+ eventSender.mouseMoveTo(20, testCompleted.offsetTop);
+ eventSender.mouseDown();
+ eventSender.mouseUp();
+ testRunner.runAfterLayoutAndPaint(checkButtonClicked);
+}
+
+function checkButtonClicked() {
+ if (!button_was_clicked) {
+ debug("FAILED : the autoscroll has failed !");
+ if (window.testRunner)
+ testRunner.notifyDone();
+ }
+}
+
+function testCompleted() {
+ button_was_clicked = true;
+ debug("PASSED : the autoscroll has worked !");
+ if (window.testRunner)
+ testRunner.notifyDone();
+}
+</script>
+
+<body onload="test()">
+ <p>Test for <a href="http://crbug.com/336373">bug 336373</a>.</p>
+ <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 occurs once the cursor leaves the bounds of the box it will remain stuck in the panning state.</p>
+
+ <div id="ScrollableIFrameDiv" style="height: 100px; width: 100px">
+ <iframe id="ScrollIFrame" src="resources/iframe-with-overflow-scrollable-div.html" style="height: 100px; width: 100px">
+ </iframe>
+ </div>
+
+ <button id="testCompletedButton" type="button" onclick="testCompleted()"> Click me </button>
+</body>
+</html>
« 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