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

Unified Diff: LayoutTests/platform/chromium-win/fast/events/panScroll-click-hyperlink.html

Issue 15103004: Move Win-specific LayoutTests to generic location (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Add calandar-picker tests to NeverFixTests for Mac Created 7 years, 7 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: LayoutTests/platform/chromium-win/fast/events/panScroll-click-hyperlink.html
diff --git a/LayoutTests/platform/chromium-win/fast/events/panScroll-click-hyperlink.html b/LayoutTests/platform/chromium-win/fast/events/panScroll-click-hyperlink.html
deleted file mode 100644
index 77a8c11b6c274fe7a27b9a97730cad30ba3e66d1..0000000000000000000000000000000000000000
--- a/LayoutTests/platform/chromium-win/fast/events/panScroll-click-hyperlink.html
+++ /dev/null
@@ -1,94 +0,0 @@
-<html>
-<head>
-<script src="../../../../fast/js/resources/js-test-pre.js"></script>
-<script>
-
-if (window.testRunner)
- testRunner.waitUntilDone()
-
-var LeftMouseButton = 0;
-var MiddleMouseButton = 1;
-
-var testContainer;
-var didClickLink1 = false;
-
-window.onload = function()
-{
- testContainer = document.getElementById("test-container");
- if (window.testRunner)
- document.body.removeChild(document.getElementById("manual-instructions"));
- runTest();
-}
-
-function checkIfClickedLink1AndFinish()
-{
- if (didClickLink1)
- testFailed("Link 1 was clicked, but shouldn't have been.");
- else
- testPassed("Link 1 wasn't clicked.");
- finished();
-}
-
-function runTest()
-{
- if (!window.eventSender)
- return;
-
- eventSender.mouseMoveTo(testContainer.offsetLeft + 10, testContainer.offsetTop + 10);
- eventSender.mouseDown(MiddleMouseButton);
- eventSender.mouseUp(MiddleMouseButton);
- eventSender.mouseMoveTo(testContainer.offsetLeft + 10, testContainer.offsetTop + testContainer.offsetHeight);
- setTimeout(clickHyperlinksIfScrolledToBottomOtherwiseFail, 500); // 500ms should be reasonable to scroll to the bottom of the <div>.
-}
-
-function finished()
-{
- debug('<br /><span class="pass">TEST COMPLETE</span>');
- document.body.removeChild(document.getElementById("test-container"));
- if (window.testRunner)
- testRunner.notifyDone();
-}
-
-function clickHyperlinksIfScrolledToBottomOtherwiseFail()
-{
- var didScrollToBottom = testContainer.scrollTop === testContainer.scrollHeight - testContainer.clientHeight;
- if (!didScrollToBottom) {
- testFailed("either pan scrolling is disabled or this platform doesn't support pan scrolling.");
- finished();
- return;
- }
-
- if (!window.eventSender)
- return;
-
- var firstLinkBoundingBox = document.getElementById("firstLink").getBoundingClientRect();
- var secondLinkBoundingBox = document.getElementById("secondLink").getBoundingClientRect();
- eventSender.mouseMoveTo(firstLinkBoundingBox.left + 10, firstLinkBoundingBox.top);
- eventSender.mouseDown(LeftMouseButton);
- eventSender.mouseUp(LeftMouseButton);
- eventSender.leapForward(100);
- eventSender.mouseMoveTo(secondLinkBoundingBox.left + 10, secondLinkBoundingBox.top);
- eventSender.mouseDown(LeftMouseButton);
- eventSender.mouseUp(LeftMouseButton);
-}
-</script>
-</head>
-<body>
-<p id="description"></p>
-<ol id="manual-instructions">
- <li>Middle-click inside the &lt;div&gt; with the red border below.</li>
- <li>Move the mouse such that you scroll the &lt;div&gt; until you see the hyperlinks &quot;Link 1&quot; and &quot;Link 2&quot;.</li>
- <li>Left-click the hyperlink &quot;Link 1&quot;.</li>
- <li>Left-click the hyperlink &quot;Link 2&quot;.</li>
-</ol>
-<div id="test-container" style="width:500px; height:100px; overflow:auto; border:2px solid red; padding:0px">
- <div id="dummy" style="height:200px"><!-- dummy element to overflow test-container --></div>
- <a id="firstLink" href="#" onclick="didClickLink1=true">Link 1</a> <a id="secondLink" href="#" onclick="checkIfClickedLink1AndFinish()">Link 2</a>
-</div>
-<div id="console"></div>
-<script>
- description("This test can be used to verify that clicking on a hyperlink is ignored when in pan scroll mode. <br/>" +
- "Note, this test is expected to fail on the Apple Mac and Chromium Mac port since they don't support pan scrolling.");
-</script>
-</body>
-</html>

Powered by Google App Engine
This is Rietveld 408576698