[SCM] WebKit Debian packaging branch, webkit-1.1, updated. upstream/1.1.15.1-1414-gc69ee75

eric at webkit.org eric at webkit.org
Thu Oct 29 20:49:59 UTC 2009


The following commit has been merged in the webkit-1.1 branch:
commit 9eab7cc6bd900c9d7503d1277cc7e4e4adb07f59
Author: eric at webkit.org <eric at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Thu Oct 22 15:53:11 2009 +0000

    2009-10-22  Andrew Scherkus  <scherkus at chromium.org>
    
            Reviewed by Eric Carlson.
    
            Fix video-played.js to use an error timeout based on time rather than function call count.
    
            https://bugs.webkit.org/show_bug.cgi?id=30657
    
            * media/video-played.js:
            (nowInSecs): Returns the current time in seconds.
            (playForMillisecs.callPauseIfTimeIsReached): Change from call counts to using elapsed time.
            (playForMillisecs): Ditto.
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@49941 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index 6942234..8fb8a82 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,16 @@
+2009-10-22  Andrew Scherkus  <scherkus at chromium.org>
+
+        Reviewed by Eric Carlson.
+
+        Fix video-played.js to use an error timeout based on time rather than function call count.
+
+        https://bugs.webkit.org/show_bug.cgi?id=30657
+
+        * media/video-played.js:
+        (nowInSecs): Returns the current time in seconds.
+        (playForMillisecs.callPauseIfTimeIsReached): Change from call counts to using elapsed time.
+        (playForMillisecs): Ditto.
+
 2009-10-22  Xan Lopez  <xlopez at igalia.com>
 
         libsoup can reconstruct URIs with empty querys now, so unskip
diff --git a/LayoutTests/media/video-played.js b/LayoutTests/media/video-played.js
index 5774968..a6a2e8e 100644
--- a/LayoutTests/media/video-played.js
+++ b/LayoutTests/media/video-played.js
@@ -96,6 +96,11 @@ function milliToSecs(milliseconds)
     return milliseconds / 1000;
 }
 
+function nowInSecs()
+{
+    return milliToSecs((new Date()).getTime());
+}
+
 function playForMillisecs(milliseconds)
 {
     if (milliToSecs(milliseconds) > video.duration) {
@@ -105,8 +110,8 @@ function playForMillisecs(milliseconds)
 
     run("video.play()");
 
+    var startTime = nowInSecs();
     var playedFromTime = video.currentTime;
-    var callCount = 0;
     var playDuration = milliToSecs(milliseconds);
     var callPauseIfTimeIsReached = function ()
     {
@@ -117,11 +122,11 @@ function playForMillisecs(milliseconds)
             // At the begining of playForMillisecs()
             playedTime = video.duration - playedFromTime + video.currentTime;
         }
-        
-        if (callCount++ > 10) {
+
+        var elapsed = nowInSecs() - startTime;
+        if (elapsed > 2) {
             // Just in case something goes wrong.
-            var elapsed = milliToSecs(callCount * milliseconds);
-            failTest("ERROR: test stalled, waited " + milliToSecs(elapsed) + "seconds for movie to play " + playedTime + " seconds");
+            failTest("ERROR: test stalled, waited " + elapsed + " seconds for movie to play " + playedTime + " seconds");
             return;
         }
         

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list