transitions/created-while-suspended.html is slow and flaky
authorcdumez@apple.com <cdumez@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 14 Jun 2017 18:42:15 +0000 (18:42 +0000)
committercdumez@apple.com <cdumez@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 14 Jun 2017 18:42:15 +0000 (18:42 +0000)
https://bugs.webkit.org/show_bug.cgi?id=173370

Reviewed by Zalan Bujtas.

The test was waiting 8 seconds at the end, unnecessarily.
Instead, end the test as soon as the transition ends, after resuming
the animations.

* TestExpectations:
* platform/gtk/TestExpectations:
* platform/wpe/TestExpectations:
* transitions/created-while-suspended-expected.txt:
* transitions/created-while-suspended.html:

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

LayoutTests/ChangeLog
LayoutTests/TestExpectations
LayoutTests/platform/gtk/TestExpectations
LayoutTests/platform/wpe/TestExpectations
LayoutTests/transitions/created-while-suspended-expected.txt
LayoutTests/transitions/created-while-suspended.html

index 649775a..38fff1f 100644 (file)
@@ -1,3 +1,20 @@
+2017-06-14  Chris Dumez  <cdumez@apple.com>
+
+        transitions/created-while-suspended.html is slow and flaky
+        https://bugs.webkit.org/show_bug.cgi?id=173370
+
+        Reviewed by Zalan Bujtas.
+
+        The test was waiting 8 seconds at the end, unnecessarily.
+        Instead, end the test as soon as the transition ends, after resuming
+        the animations.
+
+        * TestExpectations:
+        * platform/gtk/TestExpectations:
+        * platform/wpe/TestExpectations:
+        * transitions/created-while-suspended-expected.txt:
+        * transitions/created-while-suspended.html:
+
 2017-06-14  Antoine Quint  <graouts@apple.com>
 
         Layout Test media/modern-media-controls/placard-support/placard-support-pip.html is failing
index 1c3c3f1..bc29aaf 100644 (file)
@@ -403,7 +403,6 @@ webkit.org/b/137883 transitions/clip-transition.html [ Failure Pass ]
 webkit.org/b/137883 transitions/color-transition-all.html [ Failure Pass ]
 webkit.org/b/137883 transitions/color-transition-premultiplied.html [ Failure Pass ]
 webkit.org/b/137883 transitions/color-transition-rounding.html [ Failure Pass ]
-webkit.org/b/137883 transitions/created-while-suspended.html [ Failure Pass ]
 webkit.org/b/137883 transitions/cross-fade-background-image.html [ Pass Failure ]
 webkit.org/b/137883 transitions/cross-fade-border-image.html [ Pass Failure ]
 webkit.org/b/137883 transitions/cubic-bezier-overflow-color.html [ Pass Failure ]
index ae85d3f..dd5538d 100644 (file)
@@ -1980,8 +1980,6 @@ webkit.org/b/143989 [ Release ] http/tests/media/hls/video-controls-live-stream.
 webkit.org/b/116958 http/tests/navigation/slowmetaredirect-basic.html [ Pass Slow ]
 webkit.org/b/116958 http/tests/navigation/slowtimerredirect-basic.html [ Pass Slow ]
 
-webkit.org/b/119264 transitions/created-while-suspended.html [ Pass Slow ]
-
 webkit.org/b/149916 http/tests/inspector/dom/disconnect-dom-tree-after-main-frame-navigation.html [ Pass Slow ]
 webkit.org/b/149916 inspector/codemirror/prettyprinting-css.html [ Pass Slow ]
 webkit.org/b/149916 inspector/codemirror/prettyprinting-css-rules.html [ Pass Timeout ]
index 03ae9bd..01f48d3 100644 (file)
@@ -383,7 +383,6 @@ Bug(WPE) css3/unicode-bidi-isolate-aharon-failing.html [ ImageOnlyFailure ]
 Bug(WPE) css3/zoom-coords.xhtml [ Failure ]
 
 webkit.org/b/133151 js/cached-window-properties.html [ Slow ]
-webkit.org/b/119264 transitions/created-while-suspended.html [ Pass Slow ]
 webkit.org/b/159754 workers/bomb.html [ Slow ]
 
 # We won't be supporting the deprecated interfaces.
index 87689a5..2ba6f2a 100644 (file)
@@ -8,5 +8,5 @@ Transitions should be suspended: PASS
 *** Adding transition property and setting left to 100px. We should NOT see transition events.
 *** Resuming Animations/Transitions
 Transitions should not be suspended: PASS
-*** Test finished
+PASS: Transition ended on element with id: box
 
index a10f5ea..cf24107 100644 (file)
@@ -11,6 +11,8 @@
 <script>
 var box;
 
+let transitionAllowedToRun = false;
+
 function suspend()
 {
     if (window.internals)
@@ -25,7 +27,13 @@ function resume()
 
 function transitionEnded(event)
 {
-    log("#### Transition ended on element with id: " + event.target.id);
+    if (transitionAllowedToRun)
+        log("PASS: Transition ended on element with id: " + event.target.id);
+    else
+        log("FAIL: Transition ended on element with id: " + event.target.id);
+
+    if (window.testRunner)
+        testRunner.notifyDone();
 }
 
 function suspendAndCreate()
@@ -45,22 +53,18 @@ function suspendAndCreate()
             log("*** Adding transition property and setting left to 100px. We should NOT see transition events.")
             box.style.webkitTransitionDuration = "100ms";
             box.style.left = "100px";
-            setTimeout(endTest, 200);
+            setTimeout(resumeAnimations, 200);
         }, 100);
     }, 100);
 }
 
-function endTest()
+function resumeAnimations()
 {
     log("*** Resuming Animations/Transitions");
+    transitionAllowedToRun = true;
     resume();
     if (window.internals)
         log("Transitions should not be suspended: " + (window.internals.animationsAreSuspended() ? "FAIL" : "PASS"));
-
-    resume(); // Just in case.
-    log("*** Test finished");
-    if (window.testRunner)
-        setTimeout(function () { testRunner.notifyDone();}, 8000);
 }
 
 function startTest()