Title: [125111] trunk/LayoutTests
Revision
125111
Author
[email protected]
Date
2012-08-08 16:39:50 -0700 (Wed, 08 Aug 2012)

Log Message

css3/calc/transitions-dependent.html was causing css3/calc/transitions.html to fail
https://bugs.webkit.org/show_bug.cgi?id=93515

Patch by Roger Fong <[email protected]> on 2012-08-08
Reviewed by Tim Horton.

The transitions-dependent.html test was causing the transitions.html test to fail.
This was a result of a timeout callback set in the first test that was only being fired
in the second test because the first test did not use waitUntilDone/notifyDone.
The second test printed out an extra TypeError: 'undefined' error message because the callback
was defined in the first test and was thus 'undefined' by the time it was called while the second test
was running.

In addition, the test contained the following line:
window.addEventListener("load", function() { waitForAnimationStart(runTest(expectedValues)); }, false);
which does not work as intended because the parameter to waitForAnimationStart should have been a function
that calls runTest, not the call to the runTest function itself, which calls the method immediately.

* css3/calc/transitions-dependent.html:
Added waitUntilDone/notifyDone.
Fixed function parameter.

Modified Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (125110 => 125111)


--- trunk/LayoutTests/ChangeLog	2012-08-08 23:37:50 UTC (rev 125110)
+++ trunk/LayoutTests/ChangeLog	2012-08-08 23:39:50 UTC (rev 125111)
@@ -1,3 +1,26 @@
+2012-08-08  Roger Fong  <[email protected]>
+
+        css3/calc/transitions-dependent.html was causing css3/calc/transitions.html to fail
+        https://bugs.webkit.org/show_bug.cgi?id=93515
+
+        Reviewed by Tim Horton.
+
+        The transitions-dependent.html test was causing the transitions.html test to fail.
+        This was a result of a timeout callback set in the first test that was only being fired
+        in the second test because the first test did not use waitUntilDone/notifyDone. 
+        The second test printed out an extra TypeError: 'undefined' error message because the callback 
+        was defined in the first test and was thus 'undefined' by the time it was called while the second test
+        was running.
+        
+        In addition, the test contained the following line:
+        window.addEventListener("load", function() { waitForAnimationStart(runTest(expectedValues)); }, false);
+        which does not work as intended because the parameter to waitForAnimationStart should have been a function
+        that calls runTest, not the call to the runTest function itself, which calls the method immediately.
+
+        * css3/calc/transitions-dependent.html:
+        Added waitUntilDone/notifyDone.
+        Fixed function parameter.
+
 2012-08-08  Florin Malita  <[email protected]>
 
         [Chromium] Unreviewed gardening: Chromium results for compositing/repaint/newly-composited-on-scroll.html.

Modified: trunk/LayoutTests/css3/calc/transitions-dependent.html (125110 => 125111)


--- trunk/LayoutTests/css3/calc/transitions-dependent.html	2012-08-08 23:37:50 UTC (rev 125110)
+++ trunk/LayoutTests/css3/calc/transitions-dependent.html	2012-08-08 23:39:50 UTC (rev 125111)
@@ -73,27 +73,32 @@
         var property = expected[i][2];
         var expectedValue = expected[i][3];
         var dependsOn = expected[i][4];
-        
         if (window.testRunner) {
             window.testRunner.pauseTransitionAtTimeOnElementWithId(property, time, dependsOn);
             window.testRunner.pauseTransitionAtTimeOnElementWithId(property, time, elementId);
             var actual = window.getComputedStyle(document.getElementById(elementId)).getPropertyCSSValue(property).getFloatValue(CSSPrimitiveValue.CSS_NUMBER);
             var result = document.getElementById("result");
-
             if (actual == expectedValue)
                 result.innerHTML += 'PASS - "' + property + '" property for "' + elementId +'" element at ' + time + 's was: ' + actual + '<br/>';
             else
                 result.innerHTML += 'FAIL - "' + property + '" property for "' + elementId +'" element at ' + time + 's expected: ' + expectedValue + ' but saw: ' + actual + '<br/>';
         }
-            
     }
+    if (window.testRunner)
+        testRunner.notifyDone();
 }
 
+function loadListener()
+{
+    waitForAnimationStart(function(){runTest(expectedValues);});
+}
+
 for (var i = 0; i < transitioningElements.length; i++) {
     var element = document.getElementById(transitioningElements[i]);
     element.className += " go";
 }
 
-window.addEventListener("load", function() { waitForAnimationStart(runTest(expectedValues)); }, false);
+window.addEventListener("load", loadListener, false);
+window.testRunner.waitUntilDone();
 
 </script>
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to