fast/images/animated-gif-body-outside-viewport.html is flaky
authorcdumez@apple.com <cdumez@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 14 Dec 2014 19:02:40 +0000 (19:02 +0000)
committercdumez@apple.com <cdumez@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 14 Dec 2014 19:02:40 +0000 (19:02 +0000)
https://bugs.webkit.org/show_bug.cgi?id=139599

Reviewed by Alexey Proskuryakov.

Update fast/images/animated-gif-body-outside-viewport.html to use
shouldBecomeEqual() instead of a setTimeout() + shouldBe() to fix
the flakiness.

* fast/images/animated-gif-body-outside-viewport-expected.txt:
* fast/images/animated-gif-body-outside-viewport.html:
* platform/mac-wk1/TestExpectations:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@177265 268f45cc-cd09-0410-ab3c-d52691b4dbfc

LayoutTests/ChangeLog
LayoutTests/fast/images/animated-gif-body-outside-viewport-expected.txt
LayoutTests/fast/images/animated-gif-body-outside-viewport.html
LayoutTests/platform/mac-wk1/TestExpectations

index d22a688..1fb7db3 100644 (file)
@@ -1,3 +1,18 @@
+2014-12-14  Chris Dumez  <cdumez@apple.com>
+
+        fast/images/animated-gif-body-outside-viewport.html is flaky
+        https://bugs.webkit.org/show_bug.cgi?id=139599
+
+        Reviewed by Alexey Proskuryakov.
+
+        Update fast/images/animated-gif-body-outside-viewport.html to use
+        shouldBecomeEqual() instead of a setTimeout() + shouldBe() to fix
+        the flakiness.
+
+        * fast/images/animated-gif-body-outside-viewport-expected.txt:
+        * fast/images/animated-gif-body-outside-viewport.html:
+        * platform/mac-wk1/TestExpectations:
+
 2014-12-14  Ryosuke Niwa  <rniwa@webkit.org>
 
         REGRESSION(r160182): Fragment parser doesn't close a form element with a close tag
index e38153a..3cfce81 100644 (file)
@@ -3,9 +3,9 @@ Make sure the background image of a body element that is outside the viewport is
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
 
-PASS isBackgroundAnimated is false
+PASS isBackgroundAnimated() became false
 Scroll down so that the body becomes visible.
-PASS isBackgroundAnimated is true
+PASS isBackgroundAnimated() became true
 PASS successfullyParsed is true
 
 TEST COMPLETE
index 0c43702..3174039 100644 (file)
@@ -5,26 +5,22 @@
 </head>
 <body style="background-image: url('resources/animated.gif'); background-repeat: repeat; position: relative; left: 0px; top: 700px; width: 200px; height: 200px" onload="runTest()">
 <script>
+description("Make sure the background image of a body element that is outside the viewport is not animated");
 jsTestIsAsync = true;
 
-function checkBackgroundAnimated() {
-  isBackgroundAnimated = !internals.hasPausedImageAnimations(document.body);
-  shouldBeTrue("isBackgroundAnimated");
-  finishJSTest();
+function isBackgroundAnimated()
+{
+  return !internals.hasPausedImageAnimations(document.body);
 }
 
-function checkBackgroundNotAnimated() {
-  isBackgroundAnimated = !internals.hasPausedImageAnimations(document.body);
-  description("Make sure the background image of a body element that is outside the viewport is not animated");
-  shouldBeFalse("isBackgroundAnimated");
-
+function scrollDown() {
   debug("Scroll down so that the body becomes visible.");
   window.scrollBy(0, 600);
-  setTimeout(checkBackgroundAnimated, 0);
+  shouldBecomeEqual("isBackgroundAnimated()", "true", finishJSTest);
 }
 
 function imageLoaded() {
-  setTimeout(checkBackgroundNotAnimated, 200);
+  shouldBecomeEqual("isBackgroundAnimated()", "false", scrollDown);
 }
 
 function runTest() {
index 2a1f4a3..a125880 100644 (file)
@@ -28,8 +28,6 @@ webkit.org/b/82747 fast/events/scroll-div-with-prevent-default-in-subframe.html
 
 webkit.org/b/112533 media/auto-play-in-sandbox-with-allow-scripts.html [ Pass Timeout ]
 
-webkit.org/b/139599 fast/images/animated-gif-body-outside-viewport.html [ Pass Failure ]
-
 ### END OF (1) Failures with bug reports
 ########################################