Diff
Modified: trunk/LayoutTests/ChangeLog (179102 => 179103)
--- trunk/LayoutTests/ChangeLog 2015-01-26 04:04:53 UTC (rev 179102)
+++ trunk/LayoutTests/ChangeLog 2015-01-26 05:01:23 UTC (rev 179103)
@@ -1,5 +1,23 @@
2015-01-25 Alexey Proskuryakov <[email protected]>
+ fast/html/marquee-scrollamount.html is flaky
+ https://bugs.webkit.org/show_bug.cgi?id=140851
+
+ Reviewed by Darin Adler.
+
+ Updated the test to not have a zero delay timer race. Added many comments, because
+ what is being tested here is quite subtle.
+
+ * fast/html/marquee-scrollamount.html:
+
+ * platform/efl/fast/html/marquee-scrollamount-expected.txt:
+ * platform/gtk/fast/html/marquee-scrollamount-expected.txt:
+ * platform/ios-simulator-wk2/fast/html/marquee-scrollamount-expected.txt:
+ * platform/mac/fast/html/marquee-scrollamount-expected.txt:
+ The DOM changed slightly, because we now insert the marquee after load event.
+
+2015-01-25 Alexey Proskuryakov <[email protected]>
+
Setting HTMLMarqueeElement.trueSpeed doesn't work
https://bugs.webkit.org/show_bug.cgi?id=140863
Modified: trunk/LayoutTests/fast/html/marquee-scrollamount.html (179102 => 179103)
--- trunk/LayoutTests/fast/html/marquee-scrollamount.html 2015-01-26 04:04:53 UTC (rev 179102)
+++ trunk/LayoutTests/fast/html/marquee-scrollamount.html 2015-01-26 05:01:23 UTC (rev 179103)
@@ -1,19 +1,30 @@
<body>
<p>This is a regression test for https://bugs.webkit.org/show_bug.cgi?id=50434. It verifies that a marquee does not animate when scrollAmount is set to 0 by script.</p>
<script>
- if (window.testRunner)
- testRunner.waitUntilDone();
+if (window.testRunner)
+ testRunner.waitUntilDone();
+
+_onload_ = function()
+{
var marquee = document.createElement("marquee");
marquee.innerHTML = "Test";
marquee.width = "100px";
- marquee.scrollDelay = 0;
+ // We need a non-zero scroll delay and amount for marquee timer to start.
+ marquee.scrollAmount = 6;
+ marquee.scrollDelay = 100000;
document.body.appendChild(marquee);
- setTimeout(function() {
- marquee.scrollAmount = 0;
- if (window.testRunner) {
- setTimeout(function() {
- testRunner.notifyDone();
- }, 55);
- }
- }, 0);
+ // Force layout now, so that marquee starts its timer.
+ marquee.offsetTop;
+ // Verify that changing scrollAmount to 0 actually stops the marquee (the bug
+ // was that starting with 0 worked correctly, but changing to 0 did not).
+ marquee.scrollAmount = 0;
+ // Set the delay to a very low value, so that scrolling would have occured before notifyDone() if not stopped.
+ marquee.trueSpeed = true;
+ marquee.scrollDelay = 1;
+ if (window.testRunner) {
+ setTimeout(function() {
+ testRunner.notifyDone();
+ }, 10);
+ }
+}
</script>
Modified: trunk/LayoutTests/platform/efl/fast/html/marquee-scrollamount-expected.txt (179102 => 179103)
--- trunk/LayoutTests/platform/efl/fast/html/marquee-scrollamount-expected.txt 2015-01-26 04:04:53 UTC (rev 179102)
+++ trunk/LayoutTests/platform/efl/fast/html/marquee-scrollamount-expected.txt 2015-01-26 05:01:23 UTC (rev 179103)
@@ -8,7 +8,6 @@
text run at (0,0) width 750: "This is a regression test for https://bugs.webkit.org/show_bug.cgi?id=50434. It verifies that a marquee does not animate"
text run at (0,18) width 250: "when scrollAmount is set to 0 by script."
RenderBlock (anonymous) at (0,52) size 784x18
- RenderText {#text} at (0,0) size 0x0
layer at (8,60) size 100x18 scrollX -100
RenderBlock {MARQUEE} at (0,0) size 100x18
RenderText {#text} at (0,0) size 27x17
Modified: trunk/LayoutTests/platform/gtk/fast/html/marquee-scrollamount-expected.txt (179102 => 179103)
--- trunk/LayoutTests/platform/gtk/fast/html/marquee-scrollamount-expected.txt 2015-01-26 04:04:53 UTC (rev 179102)
+++ trunk/LayoutTests/platform/gtk/fast/html/marquee-scrollamount-expected.txt 2015-01-26 05:01:23 UTC (rev 179103)
@@ -8,7 +8,6 @@
text run at (0,0) width 750: "This is a regression test for https://bugs.webkit.org/show_bug.cgi?id=50434. It verifies that a marquee does not animate"
text run at (0,17) width 250: "when scrollAmount is set to 0 by script."
RenderBlock (anonymous) at (0,50) size 784x17
- RenderText {#text} at (0,0) size 0x0
layer at (8,58) size 100x17 scrollX -100
RenderBlock {MARQUEE} at (0,0) size 100x17
RenderText {#text} at (0,0) size 27x17
Modified: trunk/LayoutTests/platform/ios-simulator-wk2/fast/html/marquee-scrollamount-expected.txt (179102 => 179103)
--- trunk/LayoutTests/platform/ios-simulator-wk2/fast/html/marquee-scrollamount-expected.txt 2015-01-26 04:04:53 UTC (rev 179102)
+++ trunk/LayoutTests/platform/ios-simulator-wk2/fast/html/marquee-scrollamount-expected.txt 2015-01-26 05:01:23 UTC (rev 179103)
@@ -8,7 +8,6 @@
text run at (0,0) width 767: "This is a regression test for https://bugs.webkit.org/show_bug.cgi?id=50434. It verifies that a marquee does not animate"
text run at (0,20) width 256: "when scrollAmount is set to 0 by script."
RenderBlock (anonymous) at (0,56) size 784x20
- RenderText {#text} at (0,0) size 0x0
layer at (8,64) size 100x20 scrollX -10
RenderBlock {MARQUEE} at (0,0) size 100x20
RenderText {#text} at (0,0) size 27x19
Modified: trunk/LayoutTests/platform/mac/fast/html/marquee-scrollamount-expected.txt (179102 => 179103)
--- trunk/LayoutTests/platform/mac/fast/html/marquee-scrollamount-expected.txt 2015-01-26 04:04:53 UTC (rev 179102)
+++ trunk/LayoutTests/platform/mac/fast/html/marquee-scrollamount-expected.txt 2015-01-26 05:01:23 UTC (rev 179103)
@@ -8,7 +8,6 @@
text run at (0,0) width 766: "This is a regression test for https://bugs.webkit.org/show_bug.cgi?id=50434. It verifies that a marquee does not animate"
text run at (0,18) width 256: "when scrollAmount is set to 0 by script."
RenderBlock (anonymous) at (0,52) size 784x18
- RenderText {#text} at (0,0) size 0x0
layer at (8,60) size 100x18 scrollX -100
RenderBlock {MARQUEE} at (0,0) size 100x18
RenderText {#text} at (0,0) size 27x18