[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc

commit-queue at webkit.org commit-queue at webkit.org
Wed Dec 22 12:16:09 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit 068bde24eb78e4c72601d5a314890226af49746f
Author: commit-queue at webkit.org <commit-queue at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Tue Aug 17 23:57:42 2010 +0000

    2010-08-17  Mihai Parparita  <mihaip at chromium.org>
    
            Reviewed by Dimitri Glazkov.
    
            transitions/change-values-during-transition.html fails intermittently
            https://bugs.webkit.org/show_bug.cgi?id=28461
    
            Make test less flaky during high CPU usage by changing the expectation
            from a hardcoded value to an interpolated one based on when the timeout
            actually fires. Made the test much more reliable when running with
            --iterations=100 while maxing out the CPU on my machine with a
            background process.
    
            * transitions/change-values-during-transition.html:
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@65575 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index 665dcf5..623d2c7 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,5 +1,20 @@
 2010-08-17  Mihai Parparita  <mihaip at chromium.org>
 
+        Reviewed by Dimitri Glazkov.
+
+        transitions/change-values-during-transition.html fails intermittently
+        https://bugs.webkit.org/show_bug.cgi?id=28461
+
+        Make test less flaky during high CPU usage by changing the expectation
+        from a hardcoded value to an interpolated one based on when the timeout
+        actually fires. Made the test much more reliable when running with
+        --iterations=100 while maxing out the CPU on my machine with a 
+        background process.
+
+        * transitions/change-values-during-transition.html:
+
+2010-08-17  Mihai Parparita  <mihaip at chromium.org>
+
         Reviewed by Darin Fisher.
 
         Back button after Google search result click broken
diff --git a/LayoutTests/transitions/change-values-during-transition.html b/LayoutTests/transitions/change-values-during-transition.html
index df0038f..861b088 100644
--- a/LayoutTests/transitions/change-values-during-transition.html
+++ b/LayoutTests/transitions/change-values-during-transition.html
@@ -1,5 +1,4 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
-   "http://www.w3.org/TR/html4/loose.dtd">
+<!DOCTYPE html>
 
 <html lang="en">
 <head>
@@ -23,6 +22,7 @@
     
     var result = "PASS";
     const defaultTolerance = 10;
+    var transitionStartTime;
     
     function isCloseEnough(actual, desired)
     {
@@ -44,19 +44,29 @@
         return t[4];
     }
     
-    function check1()
+    function checkIntermediateValue()
     {
-        var xPos = getXPosition();
-        if (!isCloseEnough(xPos, 50))
-            result = "FAIL(was:"+xPos+", s/b:50)";
+        // We should be roughly halfway in the transition from 0 to 100, but the
+        // timeout may not fire exactly then. Figure out where we should be 
+        // based on a linear interpolation of timestamps.
+        var actualXPos = getXPosition();
+        var expectedXPos = (new Date().getTime() - transitionStartTime)/1000 * 100;
+        if (!isCloseEnough(actualXPos, expectedXPos))
+            result = 'FAIL for intermediate value (was: ' + actualXPos + ', expected: ' + expectedXPos + ')';
     }
 
-    function check2()
+    function checkFinalValue()
     {
-        var xPos = getXPosition();
-        if (!isCloseEnough(xPos, 0))
-            result += "FAIL(was:"+xPos+", s/b:0)";
-            
+        var actualXPos = getXPosition();
+        var transitionFraction = (new Date().getTime() - transitionStartTime)/100;
+        var expectedXPos = 100 - Math.min(transitionFraction, 1) * 100;
+ 
+        if (!isCloseEnough(actualXPos, expectedXPos)) {
+            if (result == 'PASS')
+                result = '';
+            result += 'FAIL for final value (was: ' + actualXPos + ', expected: ' + expectedXPos + ')';
+        }
+        
         document.getElementById('result').innerText = result;
         if (window.layoutTestController)
             layoutTestController.notifyDone();
@@ -66,15 +76,17 @@
     {
         var box = document.getElementById('box');
         box.style.webkitTransform = 'translateX(0)';
+        transitionStartTime = new Date().getTime();
     }
 
     function start()
     {
         var box = document.getElementById('box');
-        setTimeout("changeValues()", 100);
-        setTimeout("check1()", 500);
-        setTimeout("check2()", 1300);
+        setTimeout(changeValues, 100);
+        setTimeout(checkIntermediateValue, 500);
+        setTimeout(checkFinalValue, 1300);
         box.style.webkitTransform = 'translateX(100px)';
+        transitionStartTime = new Date().getTime();
     }
     
     window.addEventListener('load', start, false);

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list