Diff
Modified: trunk/LayoutTests/ChangeLog (145407 => 145408)
--- trunk/LayoutTests/ChangeLog 2013-03-11 21:37:44 UTC (rev 145407)
+++ trunk/LayoutTests/ChangeLog 2013-03-11 21:48:19 UTC (rev 145408)
@@ -1,3 +1,34 @@
+2013-03-11 Benjamin Poulain <benja...@webkit.org>
+
+ Modernize the test visited-link-background-color.html
+ https://bugs.webkit.org/show_bug.cgi?id=111931
+
+ Reviewed by Sam Weinig.
+
+ Make the test a ref-test instead of a pixel test.
+
+ Use Internals' computedStyleIncludingVisitedInfo to make the test reliable
+ on platforms where the visited link list is updated asynchronously.
+
+ * fast/history/visited-link-background-color-expected.html: Copied from LayoutTests/fast/history/visited-link-background-color.html.
+ * fast/history/visited-link-background-color.html:
+ * platform/chromium-linux/fast/history/visited-link-background-color-expected.png: Removed.
+ * platform/chromium-win/fast/history/visited-link-background-color-expected.png: Removed.
+ * platform/chromium/TestExpectations:
+ * platform/chromium/fast/history/visited-link-background-color-expected.png: Removed.
+ * platform/chromium/fast/history/visited-link-background-color-expected.txt: Removed.
+ * platform/efl-wk1/fast/history/visited-link-background-color-expected.png: Removed.
+ * platform/efl/fast/history/visited-link-background-color-expected.png: Removed.
+ * platform/efl/fast/history/visited-link-background-color-expected.txt: Removed.
+ * platform/gtk/fast/history/visited-link-background-color-expected.png: Removed.
+ * platform/gtk/fast/history/visited-link-background-color-expected.txt: Removed.
+ * platform/mac-wk2/fast/history/visited-link-background-color-expected.png: Removed.
+ * platform/mac-wk2/fast/history/visited-link-background-color-expected.txt: Removed.
+ * platform/mac/fast/history/visited-link-background-color-expected.png: Removed.
+ * platform/mac/fast/history/visited-link-background-color-expected.txt: Removed.
+ * platform/qt/fast/history/visited-link-background-color-expected.png: Removed.
+ * platform/qt/fast/history/visited-link-background-color-expected.txt: Removed.
+
2013-03-11 Sheriff Bot <webkit.review....@gmail.com>
Unreviewed, rolling out r144818.
Added: trunk/LayoutTests/fast/history/visited-link-background-color-expected.html (0 => 145408)
--- trunk/LayoutTests/fast/history/visited-link-background-color-expected.html (rev 0)
+++ trunk/LayoutTests/fast/history/visited-link-background-color-expected.html 2013-03-11 21:48:19 UTC (rev 145408)
@@ -0,0 +1,15 @@
+<style>
+a {
+ display:block;
+ width:500px;
+ height:500px;
+ color:white;
+}
+a:link {
+ background:olive;
+}
+</style>
+<body>
+<iframe src="" style="display:none"></iframe>
+<a href="" text should be white on an olive background.</a>
+</body>
Modified: trunk/LayoutTests/fast/history/visited-link-background-color.html (145407 => 145408)
--- trunk/LayoutTests/fast/history/visited-link-background-color.html 2013-03-11 21:37:44 UTC (rev 145407)
+++ trunk/LayoutTests/fast/history/visited-link-background-color.html 2013-03-11 21:48:19 UTC (rev 145408)
@@ -9,9 +9,27 @@
}
</style>
<script>
-if (window.testRunner)
- window.testRunner.keepWebHistory();
+if (window.testRunner) {
+ testRunner.waitUntilDone();
+ testRunner.keepWebHistory();
+}
+function waitForStyleChange(failureTime)
+{
+ var aElement = document.getElementsByTagName('a')[0];
+ if (internals.computedStyleIncludingVisitedInfo(aElement).color === 'rgb(255, 255, 255)')
+ testRunner.notifyDone();
+ else if (Date.now() > failureTime)
+ testRunner.notifyDone();
+ else
+ setTimeout(waitForStyleChange, 5, failureTime);
+}
+function doTest()
+{
+ if (window.testRunner)
+ waitForStyleChange(Date.now() + 500);
+}
</script>
-<body>
+<body _onload_="doTest()">
<iframe src="" style="display:none"></iframe>
<a href="" text should be white on an olive background.</a>
+</body>
Modified: trunk/LayoutTests/platform/chromium/TestExpectations (145407 => 145408)
--- trunk/LayoutTests/platform/chromium/TestExpectations 2013-03-11 21:37:44 UTC (rev 145407)
+++ trunk/LayoutTests/platform/chromium/TestExpectations 2013-03-11 21:48:19 UTC (rev 145408)
@@ -2194,7 +2194,7 @@
webkit.org/b/111031 fast/history/self-is-visited.html [ Failure ]
webkit.org/b/111031 fast/history/sibling-visited-test.html [ Failure ]
webkit.org/b/111031 fast/loader/stateobjects/state-url-sets-links-visited.html [ Failure ]
-webkit.org/b/111031 [ Mac Android ] fast/history/visited-link-background-color.html [ Failure ]
+webkit.org/b/111031 fast/history/visited-link-background-color.html [ ImageOnlyFailure ]
# Tests that work with KURL, but fail with GURL
webkit.org/b/71758 fast/url/invalid-urls-utf8.html [ Failure ]
Deleted: trunk/LayoutTests/platform/chromium/fast/history/visited-link-background-color-expected.png
(Binary files differ)
Deleted: trunk/LayoutTests/platform/chromium/fast/history/visited-link-background-color-expected.txt (145407 => 145408)
--- trunk/LayoutTests/platform/chromium/fast/history/visited-link-background-color-expected.txt 2013-03-11 21:37:44 UTC (rev 145407)
+++ trunk/LayoutTests/platform/chromium/fast/history/visited-link-background-color-expected.txt 2013-03-11 21:48:19 UTC (rev 145408)
@@ -1,8 +0,0 @@
-layer at (0,0) size 800x600
- RenderView at (0,0) size 800x600
-layer at (0,0) size 800x600
- RenderBlock {HTML} at (0,0) size 800x600
- RenderBody {BODY} at (8,8) size 784x584
- RenderBlock {A} at (0,0) size 500x500 [color=#0000EE] [bgcolor=#808000]
- RenderText {#text} at (0,0) size 298x19
- text run at (0,0) width 298: "This text should be white on an olive background."
Deleted: trunk/LayoutTests/platform/chromium-linux/fast/history/visited-link-background-color-expected.png
(Binary files differ)
Deleted: trunk/LayoutTests/platform/chromium-win/fast/history/visited-link-background-color-expected.png
(Binary files differ)
Deleted: trunk/LayoutTests/platform/mac/fast/history/visited-link-background-color-expected.png
(Binary files differ)
Deleted: trunk/LayoutTests/platform/mac/fast/history/visited-link-background-color-expected.txt (145407 => 145408)
--- trunk/LayoutTests/platform/mac/fast/history/visited-link-background-color-expected.txt 2013-03-11 21:37:44 UTC (rev 145407)
+++ trunk/LayoutTests/platform/mac/fast/history/visited-link-background-color-expected.txt 2013-03-11 21:48:19 UTC (rev 145408)
@@ -1,8 +0,0 @@
-layer at (0,0) size 800x600
- RenderView at (0,0) size 800x600
-layer at (0,0) size 800x600
- RenderBlock {HTML} at (0,0) size 800x600
- RenderBody {BODY} at (8,8) size 784x584
- RenderBlock {A} at (0,0) size 500x500 [color=#FFFFFF] [bgcolor=#808000]
- RenderText {#text} at (0,0) size 316x18
- text run at (0,0) width 316: "This text should be white on an olive background."
Deleted: trunk/LayoutTests/platform/qt/fast/history/visited-link-background-color-expected.png
(Binary files differ)
Deleted: trunk/LayoutTests/platform/qt/fast/history/visited-link-background-color-expected.txt (145407 => 145408)
--- trunk/LayoutTests/platform/qt/fast/history/visited-link-background-color-expected.txt 2013-03-11 21:37:44 UTC (rev 145407)
+++ trunk/LayoutTests/platform/qt/fast/history/visited-link-background-color-expected.txt 2013-03-11 21:48:19 UTC (rev 145408)
@@ -1,8 +0,0 @@
-layer at (0,0) size 800x600
- RenderView at (0,0) size 800x600
-layer at (0,0) size 800x600
- RenderBlock {HTML} at (0,0) size 800x600
- RenderBody {BODY} at (8,8) size 784x584
- RenderBlock {A} at (0,0) size 500x500 [color=#FFFFFF] [bgcolor=#808000]
- RenderText {#text} at (0,0) size 298x19
- text run at (0,0) width 298: "This text should be white on an olive background."