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

Unified Diff: third_party/WebKit/LayoutTests/fast/events/panScroll-modal-scrollable-iframe-div.html

Issue 2289213002: Implement Middle Click Autoscroll on all platforms not just Windows (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Merge branch 'master' of https://chromium.googlesource.com/chromium/src into panscroll Created 4 years, 3 months 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
Index: third_party/WebKit/LayoutTests/fast/events/panScroll-modal-scrollable-iframe-div.html
diff --git a/third_party/WebKit/LayoutTests/fast/events/panScroll-modal-scrollable-iframe-div.html b/third_party/WebKit/LayoutTests/fast/events/panScroll-modal-scrollable-iframe-div.html
deleted file mode 100644
index bfcd0b186620e0d572f00f88e0f1c104a368ea7b..0000000000000000000000000000000000000000
--- a/third_party/WebKit/LayoutTests/fast/events/panScroll-modal-scrollable-iframe-div.html
+++ /dev/null
@@ -1,76 +0,0 @@
-<!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.mouseUp(1);
- eventSender.mouseMoveTo(x + 220, y + 220);
- 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, h);
- // This click exits the pan scroll mode.
- eventSender.mouseDown();
- eventSender.mouseUp();
- // This click actually clicks the button.
- 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>

Powered by Google App Engine
This is Rietveld 408576698