Title: [123583] trunk/LayoutTests
Revision
123583
Author
[email protected]
Date
2012-07-25 00:32:07 -0700 (Wed, 25 Jul 2012)

Log Message

fast/events/panScroll-click-hyperlink.html test should be put in platform/win
https://bugs.webkit.org/show_bug.cgi?id=92111

Reviewed by Daniel Bates.

Move the test into platform/win directory where other pan scrolling tests reside,
and remove other ports' baselines as they just indicated that pan scrolling is not
supported on those platforms. chromium-win and qt-win platforms still pass the test
but should cope with the default baseline just fine.

* platform/chromium-linux/fast/events/panScroll-click-hyperlink-expected.txt: Removed.
* platform/chromium-win/fast/events/panScroll-click-hyperlink-expected.txt: Removed.
* platform/efl/fast/events/panScroll-click-hyperlink-expected.txt: Removed.
* platform/gtk/TestExpectations:
* platform/mac/fast/events/panScroll-click-hyperlink-expected.txt: Removed.
* platform/qt/fast/events/panScroll-click-hyperlink-expected.txt: Removed.
* platform/win/fast/events/panScroll-click-hyperlink.html: Renamed from LayoutTests/fast/events/panScroll-click-hyperlink.html.

Modified Paths

Added Paths

Removed Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (123582 => 123583)


--- trunk/LayoutTests/ChangeLog	2012-07-25 07:22:48 UTC (rev 123582)
+++ trunk/LayoutTests/ChangeLog	2012-07-25 07:32:07 UTC (rev 123583)
@@ -1,3 +1,23 @@
+2012-07-25  Zan Dobersek  <[email protected]>
+
+        fast/events/panScroll-click-hyperlink.html test should be put in platform/win
+        https://bugs.webkit.org/show_bug.cgi?id=92111
+
+        Reviewed by Daniel Bates.
+
+        Move the test into platform/win directory where other pan scrolling tests reside,
+        and remove other ports' baselines as they just indicated that pan scrolling is not
+        supported on those platforms. chromium-win and qt-win platforms still pass the test
+        but should cope with the default baseline just fine.
+
+        * platform/chromium-linux/fast/events/panScroll-click-hyperlink-expected.txt: Removed.
+        * platform/chromium-win/fast/events/panScroll-click-hyperlink-expected.txt: Removed.
+        * platform/efl/fast/events/panScroll-click-hyperlink-expected.txt: Removed.
+        * platform/gtk/TestExpectations:
+        * platform/mac/fast/events/panScroll-click-hyperlink-expected.txt: Removed.
+        * platform/qt/fast/events/panScroll-click-hyperlink-expected.txt: Removed.
+        * platform/win/fast/events/panScroll-click-hyperlink.html: Renamed from LayoutTests/fast/events/panScroll-click-hyperlink.html.
+
 2012-07-24  Yoshifumi Inoue  <[email protected]>
 
         [Tests] Copy fast/forms/number/number-spinbutton-change-and-input-events.html to fast/forms/js/resources

Deleted: trunk/LayoutTests/fast/events/panScroll-click-hyperlink.html (123582 => 123583)


--- trunk/LayoutTests/fast/events/panScroll-click-hyperlink.html	2012-07-25 07:22:48 UTC (rev 123582)
+++ trunk/LayoutTests/fast/events/panScroll-click-hyperlink.html	2012-07-25 07:32:07 UTC (rev 123583)
@@ -1,94 +0,0 @@
-<html>
-<head>
-<script src=""
-<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>

Deleted: trunk/LayoutTests/platform/chromium-linux/fast/events/panScroll-click-hyperlink-expected.txt (123582 => 123583)


--- trunk/LayoutTests/platform/chromium-linux/fast/events/panScroll-click-hyperlink-expected.txt	2012-07-25 07:22:48 UTC (rev 123582)
+++ trunk/LayoutTests/platform/chromium-linux/fast/events/panScroll-click-hyperlink-expected.txt	2012-07-25 07:32:07 UTC (rev 123583)
@@ -1,10 +0,0 @@
-This test can be used to verify that clicking on a hyperlink is ignored when in pan scroll mode. 
-Note, this test is expected to fail on the Apple Mac and Chromium Mac port since they don't support pan scrolling.
-
-On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
-
-
-FAIL either pan scrolling is disabled or this platform doesn't support pan scrolling.
-
-TEST COMPLETE
-

Deleted: trunk/LayoutTests/platform/chromium-win/fast/events/panScroll-click-hyperlink-expected.txt (123582 => 123583)


--- trunk/LayoutTests/platform/chromium-win/fast/events/panScroll-click-hyperlink-expected.txt	2012-07-25 07:22:48 UTC (rev 123582)
+++ trunk/LayoutTests/platform/chromium-win/fast/events/panScroll-click-hyperlink-expected.txt	2012-07-25 07:32:07 UTC (rev 123583)
@@ -1,10 +0,0 @@
-This test can be used to verify that clicking on a hyperlink is ignored when in pan scroll mode. 
-Note, this test is expected to fail on the Apple Mac and Chromium Mac port since they don't support pan scrolling.
-
-On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
-
-
-PASS Link 1 wasn't clicked.
-
-TEST COMPLETE
-

Deleted: trunk/LayoutTests/platform/efl/fast/events/panScroll-click-hyperlink-expected.txt (123582 => 123583)


--- trunk/LayoutTests/platform/efl/fast/events/panScroll-click-hyperlink-expected.txt	2012-07-25 07:22:48 UTC (rev 123582)
+++ trunk/LayoutTests/platform/efl/fast/events/panScroll-click-hyperlink-expected.txt	2012-07-25 07:32:07 UTC (rev 123583)
@@ -1,10 +0,0 @@
-This test can be used to verify that clicking on a hyperlink is ignored when in pan scroll mode. 
-Note, this test is expected to fail on the Apple Mac and Chromium Mac port since they don't support pan scrolling.
-
-On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
-
-
-FAIL either pan scrolling is disabled or this platform doesn't support pan scrolling.
-
-TEST COMPLETE
-

Modified: trunk/LayoutTests/platform/gtk/TestExpectations (123582 => 123583)


--- trunk/LayoutTests/platform/gtk/TestExpectations	2012-07-25 07:22:48 UTC (rev 123582)
+++ trunk/LayoutTests/platform/gtk/TestExpectations	2012-07-25 07:32:07 UTC (rev 123583)
@@ -1143,7 +1143,6 @@
 BUGWK84679 : css3/zoom-coords.xhtml = TEXT
 
 BUGWK84694 : fast/events/selectstart-by-double-triple-clicks.html = TEXT
-BUGWK84693 : fast/events/panScroll-click-hyperlink.html = MISSING
 BUGWK84692 : fast/events/attempt-scroll-with-no-scrollbars.html = TEXT
 
 BUGWK84701 : fast/block/line-layout/selection-highlight-overlap.html = IMAGE

Deleted: trunk/LayoutTests/platform/mac/fast/events/panScroll-click-hyperlink-expected.txt (123582 => 123583)


--- trunk/LayoutTests/platform/mac/fast/events/panScroll-click-hyperlink-expected.txt	2012-07-25 07:22:48 UTC (rev 123582)
+++ trunk/LayoutTests/platform/mac/fast/events/panScroll-click-hyperlink-expected.txt	2012-07-25 07:32:07 UTC (rev 123583)
@@ -1,10 +0,0 @@
-This test can be used to verify that clicking on a hyperlink is ignored when in pan scroll mode. 
-Note, this test is expected to fail on the Apple Mac and Chromium Mac port since they don't support pan scrolling.
-
-On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
-
-
-FAIL either pan scrolling is disabled or this platform doesn't support pan scrolling.
-
-TEST COMPLETE
-

Deleted: trunk/LayoutTests/platform/qt/fast/events/panScroll-click-hyperlink-expected.txt (123582 => 123583)


--- trunk/LayoutTests/platform/qt/fast/events/panScroll-click-hyperlink-expected.txt	2012-07-25 07:22:48 UTC (rev 123582)
+++ trunk/LayoutTests/platform/qt/fast/events/panScroll-click-hyperlink-expected.txt	2012-07-25 07:32:07 UTC (rev 123583)
@@ -1,10 +0,0 @@
-This test can be used to verify that clicking on a hyperlink is ignored when in pan scroll mode. 
-Note, this test is expected to fail on the Apple Mac and Chromium Mac port since they don't support pan scrolling.
-
-On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
-
-
-FAIL either pan scrolling is disabled or this platform doesn't support pan scrolling.
-
-TEST COMPLETE
-

Added: trunk/LayoutTests/platform/win/fast/events/panScroll-click-hyperlink.html (0 => 123583)


--- trunk/LayoutTests/platform/win/fast/events/panScroll-click-hyperlink.html	                        (rev 0)
+++ trunk/LayoutTests/platform/win/fast/events/panScroll-click-hyperlink.html	2012-07-25 07:32:07 UTC (rev 123583)
@@ -0,0 +1,94 @@
+<html>
+<head>
+<script src=""
+<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>
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to