Title: [114178] trunk/LayoutTests
Revision
114178
Author
simon.fra...@apple.com
Date
2012-04-13 16:25:34 -0700 (Fri, 13 Apr 2012)

Log Message

Fix two compositing animation tests to not have flakey pixel results
https://bugs.webkit.org/show_bug.cgi?id=83957

Reviewed by Dean Jackson.

Fix these tests to use the pause animation API by providing an animation
name in the expected data. There's no need to start the animations by hand.

* compositing/reflections/animation-inside-reflection.html:
* compositing/reflections/nested-reflection-animated.html:
* platform/mac/compositing/reflections/animation-inside-reflection-expected.png:
* platform/mac/compositing/reflections/nested-reflection-animated-expected.png:

Modified Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (114177 => 114178)


--- trunk/LayoutTests/ChangeLog	2012-04-13 23:16:39 UTC (rev 114177)
+++ trunk/LayoutTests/ChangeLog	2012-04-13 23:25:34 UTC (rev 114178)
@@ -1,3 +1,18 @@
+2012-04-13  Simon Fraser  <simon.fra...@apple.com>
+
+        Fix two compositing animation tests to not have flakey pixel results
+        https://bugs.webkit.org/show_bug.cgi?id=83957
+
+        Reviewed by Dean Jackson.
+        
+        Fix these tests to use the pause animation API by providing an animation
+        name in the expected data. There's no need to start the animations by hand.
+
+        * compositing/reflections/animation-inside-reflection.html:
+        * compositing/reflections/nested-reflection-animated.html:
+        * platform/mac/compositing/reflections/animation-inside-reflection-expected.png:
+        * platform/mac/compositing/reflections/nested-reflection-animated-expected.png:
+
 2012-04-13  Anders Carlsson  <ander...@apple.com>
 
         Rebaseline this since svg/custom/resources/green-checker.png changed.

Modified: trunk/LayoutTests/compositing/reflections/animation-inside-reflection.html (114177 => 114178)


--- trunk/LayoutTests/compositing/reflections/animation-inside-reflection.html	2012-04-13 23:16:39 UTC (rev 114177)
+++ trunk/LayoutTests/compositing/reflections/animation-inside-reflection.html	2012-04-13 23:25:34 UTC (rev 114178)
@@ -50,22 +50,19 @@
   <script type="text/_javascript_" charset="utf-8">
     const expectedValues = [
       // [animation-name, time, element-id, property, expected-value, tolerance]
-      [null, 0.5, "animated", "webkitTransform.0", 0.76, 0.1],
+      ["swing", 0.5, "animated", "webkitTransform.0", 0.76, 0.1],
     ];
     
-    function startAnimation()
-    {
-      document.getElementById('animated').className = 'animated';
-    }
-
-    runAnimationTest(expectedValues, startAnimation, 'load', false, true /* pixel test */);
+    var pixelTest = true;
+    var disablePauseAPI = false;
+    runAnimationTest(expectedValues, null, null, disablePauseAPI, pixelTest);
   </script>
   </head>
 <body>
   <p>The top left box, and all reflections should be rotated 45deg.</p>
   <div class="outer">
     <div id="inner" class="inner">
-      <div id="animated"></div>
+      <div id="animated" class="animated"></div>
     </div>
   </div>
   <div id="result"></div>

Modified: trunk/LayoutTests/compositing/reflections/nested-reflection-animated.html (114177 => 114178)


--- trunk/LayoutTests/compositing/reflections/nested-reflection-animated.html	2012-04-13 23:16:39 UTC (rev 114177)
+++ trunk/LayoutTests/compositing/reflections/nested-reflection-animated.html	2012-04-13 23:25:34 UTC (rev 114178)
@@ -42,21 +42,18 @@
   <script type="text/_javascript_" charset="utf-8">
     const expectedValues = [
       // [animation-name, time, element-id, property, expected-value, tolerance]
-      [null, 0.5, "inner", "webkitTransform.0", 0.76, 0.1],
+      ["swing", 0.5, "inner", "webkitTransform.0", 0.76, 0.1],
     ];
     
-    function startAnimation()
-    {
-      document.getElementById('inner').className = 'inner composited animated';
-    }
-
-    runAnimationTest(expectedValues, startAnimation, 'load', false, true /* pixel test */);
+    var pixelTest = true;
+    var disablePauseAPI = false;
+    runAnimationTest(expectedValues, null, null, disablePauseAPI, pixelTest);
   </script>
   </head>
 <body>
   <p>Animation on original and reflection should both be paused half way through, giving 45deg rotation.</p>
   <div class="outer composited">
-    <div id="inner" class="inner composited">
+    <div id="inner" class="inner composited animated">
       1
     </div>
   </div>

Modified: trunk/LayoutTests/platform/mac/compositing/reflections/animation-inside-reflection-expected.png


(Binary files differ)

Modified: trunk/LayoutTests/platform/mac/compositing/reflections/nested-reflection-animated-expected.png


(Binary files differ)
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to