Title: [144963] trunk/LayoutTests
Revision
144963
Author
t...@chromium.org
Date
2013-03-06 12:24:14 -0800 (Wed, 06 Mar 2013)

Log Message

fast/css/hover-update.html is flaky
https://bugs.webkit.org/show_bug.cgi?id=111592

Reviewed by Ryosuke Niwa.

Speculative fix for a flaky test. The test sometimes fails on slower machines (mostly debug).
Re-check the results in a loop for up to 200ms to see if the :hover pseudo style applies.

Also force a layout after changing the style, which should also trigger the :hover style.

* fast/css/hover-update.html:
* platform/chromium/TestExpectations:
* platform/efl/TestExpectations:
* platform/gtk/TestExpectations:
* platform/mac/TestExpectations:

Modified Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (144962 => 144963)


--- trunk/LayoutTests/ChangeLog	2013-03-06 20:16:23 UTC (rev 144962)
+++ trunk/LayoutTests/ChangeLog	2013-03-06 20:24:14 UTC (rev 144963)
@@ -1,3 +1,21 @@
+2013-03-06  Tony Chang  <t...@chromium.org>
+
+        fast/css/hover-update.html is flaky
+        https://bugs.webkit.org/show_bug.cgi?id=111592
+
+        Reviewed by Ryosuke Niwa.
+
+        Speculative fix for a flaky test. The test sometimes fails on slower machines (mostly debug).
+        Re-check the results in a loop for up to 200ms to see if the :hover pseudo style applies.
+
+        Also force a layout after changing the style, which should also trigger the :hover style.
+
+        * fast/css/hover-update.html:
+        * platform/chromium/TestExpectations:
+        * platform/efl/TestExpectations:
+        * platform/gtk/TestExpectations:
+        * platform/mac/TestExpectations:
+
 2013-03-06  Rafael Weinstein  <rafa...@chromium.org>
 
         Unreviewed gardening: svg/custom/foreign-object-skew.svg

Modified: trunk/LayoutTests/fast/css/hover-update.html (144962 => 144963)


--- trunk/LayoutTests/fast/css/hover-update.html	2013-03-06 20:16:23 UTC (rev 144962)
+++ trunk/LayoutTests/fast/css/hover-update.html	2013-03-06 20:24:14 UTC (rev 144963)
@@ -21,7 +21,14 @@
 <script type="text/_javascript_">
 function finish()
 {
-    shouldBeEqualToString("window.getComputedStyle(document.getElementById('b'), null).backgroundColor", "rgb(0, 128, 0)");
+    var expectedBackgroundColor = "rgb(0, 128, 0)";
+    // This test was failing on slower machines, so we give it more time to try to apply the hover state.
+    var timeSinceStartedCheckingMs = Date.now() - window.startCheckingForHoverMs;
+    if (timeSinceStartedCheckingMs < 200 && getComputedStyle(document.getElementById('b')).backgroundColor != expectedBackgroundColor) {
+        setTimeout(finish, 10);
+        return;
+    }
+    shouldBeEqualToString("window.getComputedStyle(document.getElementById('b'), null).backgroundColor", expectedBackgroundColor);
 
     if (window.testRunner)
         testRunner.notifyDone();
@@ -30,6 +37,8 @@
 function hideC()
 {
     c.style.display = 'none';
+    document.body.offsetLeft;
+    window.startCheckingForHoverMs = Date.now();
     window.setTimeout(finish, 0);
 }
 
@@ -43,7 +52,7 @@
     if (!window.testRunner)
         return;
 
-    debug('Hover color before test: ' + window.getComputedStyle(document.getElementById("b"), null).backgroundColor);
+    debug('Hover color before test: ' + getComputedStyle(document.getElementById("b")).backgroundColor);
 
     testRunner.waitUntilDone();
     var target = document.getElementById('target');

Modified: trunk/LayoutTests/platform/chromium/TestExpectations (144962 => 144963)


--- trunk/LayoutTests/platform/chromium/TestExpectations	2013-03-06 20:16:23 UTC (rev 144962)
+++ trunk/LayoutTests/platform/chromium/TestExpectations	2013-03-06 20:24:14 UTC (rev 144963)
@@ -3431,8 +3431,6 @@
 # Skip it because it seems its frame loading notifications leak to the next test.
 webkit.org/b/85949 http/tests/loading/post-in-iframe-with-back-navigation.html [ Skip ]
 
-webkit.org/b/85951 [ Win Debug ] fast/css/hover-update.html [ Failure Pass ]
-
 # Requires ENABLE(MEDIA_CAPTURE)
 webkit.org/b/85958 fast/forms/file/file-input-capture.html [ Failure ]
 

Modified: trunk/LayoutTests/platform/efl/TestExpectations (144962 => 144963)


--- trunk/LayoutTests/platform/efl/TestExpectations	2013-03-06 20:16:23 UTC (rev 144962)
+++ trunk/LayoutTests/platform/efl/TestExpectations	2013-03-06 20:24:14 UTC (rev 144963)
@@ -1610,7 +1610,6 @@
 Bug(EFL) editing/selection/caret-ltr-2-left.html [ Failure Pass ]
 Bug(EFL) editing/selection/caret-ltr-2.html [ Failure Pass ]
 Bug(EFL) editing/selection/caret-rtl-2.html [ Failure Pass ]
-Bug(EFL) fast/css/hover-update.html [ Failure Pass ]
 Bug(EFL) fast/dynamic/012.html [ Failure ]
 Bug(EFL) fast/dynamic/layer-hit-test-crash.html [ Failure ]
 Bug(EFL) fast/layers/layer-visibility-sublayer.html [ Failure ]

Modified: trunk/LayoutTests/platform/gtk/TestExpectations (144962 => 144963)


--- trunk/LayoutTests/platform/gtk/TestExpectations	2013-03-06 20:16:23 UTC (rev 144962)
+++ trunk/LayoutTests/platform/gtk/TestExpectations	2013-03-06 20:24:14 UTC (rev 144963)
@@ -523,8 +523,6 @@
 
 webkit.org/b/78344 fast/text/international/inline-plaintext-relayout-with-leading-neutrals.html [ ImageOnlyFailure Pass ]
 
-webkit.org/b/80246 fast/css/hover-update.html [ Failure Pass ]
-
 webkit.org/b/86971 svg/custom/non-scaling-stroke-markers.svg [ Failure Pass ]
 
 webkit.org/b/89650 [ Debug ] svg/W3C-SVG-1.1/animate-elem-05-t.svg [ Failure Pass ]

Modified: trunk/LayoutTests/platform/mac/TestExpectations (144962 => 144963)


--- trunk/LayoutTests/platform/mac/TestExpectations	2013-03-06 20:16:23 UTC (rev 144962)
+++ trunk/LayoutTests/platform/mac/TestExpectations	2013-03-06 20:24:14 UTC (rev 144963)
@@ -1436,5 +1436,3 @@
 webkit.org/b/111016 http/tests/loading/promote-img-preload-priority.html [ Failure ]
 
 webkit.org/b/111521 editing/selection/selection-invalid-offset.html [ Crash Pass ]
-
-webkit.org/b/111592 fast/css/hover-update.html [ Failure Pass ]
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to