[SCM] WebKit Debian packaging branch, webkit-1.2, updated. upstream/1.1.90-6072-g9a69373

jparent at chromium.org jparent at chromium.org
Thu Apr 8 00:12:38 UTC 2010


The following commit has been merged in the webkit-1.2 branch:
commit de2b1c4a1289365a4ce4cab2f8c66068da05df05
Author: jparent at chromium.org <jparent at chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Wed Dec 2 21:36:03 2009 +0000

    Make change-values-during-transition less flaky.  Transition is 1 sec duration,
    translating 100px, starting at 0, so it should be at 50px at 500ms, not 600ms.
    
    Reviewed by Darin Adler.
    
    https://bugs.webkit.org/show_bug.cgi?id=31997
    
    * transitions/change-values-during-transition.html:
    isEqual: Remove unnecessary code - tolerance always passed in and always default value.
    getXPosition: Extract into a function, since it is duplicated twice.
    check2: Still run second check if the first fails, just give more debugging output.
    start: Remove final setTimeout - nothing changes between the end of check2 and here,
        so this is just making the test take 100ms longer.
    
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@51613 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index 1a1df8e..a0f812e 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,19 @@
+2009-11-30  Julie Parent  <jparent at chromium.org>
+
+        Reviewed by Darin Adler.
+
+        Make change-values-during-transition less flaky.  Transition is 1 sec duration,
+        translating 100px, starting at 0, so it should be at 50px at 500ms, not 600ms.
+                
+        https://bugs.webkit.org/show_bug.cgi?id=31997
+
+        * transitions/change-values-during-transition.html:
+        isEqual: Remove unnecessary code - tolerance always passed in and always default value.
+        getXPosition: Extract into a function, since it is duplicated twice.
+        check2: Still run second check if the first fails, just give more debugging output.
+        start: Remove final setTimeout - nothing changes between the end of check2 and here,
+            so this is just making the test take 100ms longer.
+
 2009-12-02  Brian Weinstein  <bweinstein at apple.com>
 
         Rubber-stamped by Adam Roben.
diff --git a/LayoutTests/transitions/change-values-during-transition.html b/LayoutTests/transitions/change-values-during-transition.html
index d864465..df0038f 100644
--- a/LayoutTests/transitions/change-values-during-transition.html
+++ b/LayoutTests/transitions/change-values-during-transition.html
@@ -21,15 +21,13 @@
       layoutTestController.waitUntilDone();
     }
     
-    result = "PASS";
+    var result = "PASS";
     const defaultTolerance = 10;
     
-    function isEqual(actual, desired, tolerance)
+    function isCloseEnough(actual, desired)
     {
-        if (tolerance == undefined || tolerance == 0)
-            tolerance = defaultTolerance;
         var diff = Math.abs(actual - desired);
-        return diff < tolerance;
+        return diff < defaultTolerance;
     }
     
     function changeValues()
@@ -38,25 +36,30 @@
         box.style.webkitTransitionDuration = "0.1s";
     }
     
-    function check1()
+    function getXPosition()
     {
         var t = window.getComputedStyle(document.getElementById('box')).webkitTransform;
-        var t = t.split("(");
-        var t = t[1].split(",");
-        if (!isEqual(t[4], 50, defaultTolerance))
-            result = "FAIL(was:"+t[4]+", s/b:50)";
+        t = t.split("(");
+        t = t[1].split(",");
+        return t[4];
+    }
+    
+    function check1()
+    {
+        var xPos = getXPosition();
+        if (!isCloseEnough(xPos, 50))
+            result = "FAIL(was:"+xPos+", s/b:50)";
     }
 
     function check2()
     {
-        if (result != "PASS")
-            return;
+        var xPos = getXPosition();
+        if (!isCloseEnough(xPos, 0))
+            result += "FAIL(was:"+xPos+", s/b:0)";
             
-        var t = window.getComputedStyle(document.getElementById('box')).webkitTransform;
-        var t = t.split("(");
-        var t = t[1].split(",");
-        if (!isEqual(t[4], 0, defaultTolerance))
-            result = "FAIL(was:"+t[4]+", s/b:0)";
+        document.getElementById('result').innerText = result;
+        if (window.layoutTestController)
+            layoutTestController.notifyDone();
     }
     
     function goBack()
@@ -69,15 +72,9 @@
     {
         var box = document.getElementById('box');
         setTimeout("changeValues()", 100);
-        setTimeout("check1()", 600);
+        setTimeout("check1()", 500);
         setTimeout("check2()", 1300);
         box.style.webkitTransform = 'translateX(100px)';
-        
-        window.setTimeout(function() {
-            document.getElementById('result').innerHTML = result;
-            if (window.layoutTestController)
-                layoutTestController.notifyDone();
-        }, 1400);
     }
     
     window.addEventListener('load', start, false);

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list