[SCM] WebKit Debian packaging branch, debian/unstable, updated. debian/1.1.18-1-697-g2f78b87
philn at webkit.org
philn at webkit.org
Wed Jan 20 22:21:04 UTC 2010
The following commit has been merged in the debian/unstable branch:
commit 70def5ab4b345ac44d6899a68de1c9b2abb60a47
Author: philn at webkit.org <philn at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Tue Jan 12 18:33:09 2010 +0000
Reviewed by Eric Carlson.
[GTK] Failing media/video-seek-past-end-playing.html
https://bugs.webkit.org/show_bug.cgi?id=33015
Listen on timeupdate event instead of waiting a fixed amount of
time, which is prone to test flackyness.
* media/audio-mpeg-supported.html:
* media/video-seek-past-end-playing.html:
* platform/gtk/Skipped:
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@53147 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index 74e34bd..9f103d5 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,17 @@
+2010-01-12 Philippe Normand <pnormand at igalia.com>
+
+ Reviewed by Eric Carlson.
+
+ [GTK] Failing media/video-seek-past-end-playing.html
+ https://bugs.webkit.org/show_bug.cgi?id=33015
+
+ Listen on timeupdate event instead of waiting a fixed amount of
+ time, which is prone to test flackyness.
+
+ * media/audio-mpeg-supported.html:
+ * media/video-seek-past-end-playing.html:
+ * platform/gtk/Skipped:
+
2010-01-12 Eric Carlson <eric.carlson at apple.com>
Reviewed by Darin Adler and Simon Fraser.
diff --git a/LayoutTests/media/audio-mpeg-supported.html b/LayoutTests/media/audio-mpeg-supported.html
index d412261..1407f6d 100644
--- a/LayoutTests/media/audio-mpeg-supported.html
+++ b/LayoutTests/media/audio-mpeg-supported.html
@@ -7,6 +7,7 @@
<script src=video-test.js></script>
<script>
+ var timeupdateEventCount = 0;
mediaElement = document.getElementsByTagName('audio')[0];
mediaElement.addEventListener('error', function() {
@@ -18,15 +19,25 @@
consoleWrite("EVENT(canplaythrough)");
testExpected("mediaElement.currentTime", 0);
mediaElement.play();
- setTimeout(testCurrentTime, 500)
});
- function testCurrentTime()
+ function timeupdate()
{
- testExpected("mediaElement.currentTime", 0, '>');
- endTest();
+ ++timeupdateEventCount;
+
+ // wait 2 timeupdate events so we are sure the media engine is
+ // playing the media.
+ if (timeupdateEventCount == 2) {
+ // make sure time is advancing
+ testExpected("mediaElement.currentTime", 0, '>');
+ // reset the counter to prevent infinite loop if the
+ // test is re-executed manually.
+ timeupdateEventCount = 0;
+ endTest();
+ }
}
+ mediaElement.addEventListener("timeupdate", timeupdate);
waitForEvent('play');
mediaElement.src = "content/silence.mpg";
diff --git a/LayoutTests/media/video-seek-past-end-playing.html b/LayoutTests/media/video-seek-past-end-playing.html
index d44a07b..15b0fd7 100644
--- a/LayoutTests/media/video-seek-past-end-playing.html
+++ b/LayoutTests/media/video-seek-past-end-playing.html
@@ -1,36 +1,51 @@
+<html>
+ <body>
+
<video loop controls></video>
<p>Test that seeking video with 'loop' past it's end rewinds to the beginning and continues playback.</p>
<script src=media-file.js></script>
<script src=video-test.js></script>
<script>
+ var timeupdateEventCount = 0;
waitForEvent('canplaythrough', function () {
testExpected("video.paused", true);
run("video.play()");
testExpected("video.paused", false);
- setTimeout(timeCheck1, 200);
});
- function timeCheck1()
+ function timeupdate()
{
- // make sure time is advancing, seek past end
- consoleWrite("");
- testExpected("video.paused", false);
- testExpected("mediaElement.currentTime", 0, '>');
- run("video.currentTime = 500");
- setTimeout(timeCheck2, 200);
+ ++timeupdateEventCount;
+
+ // wait 2 timeupdate events so we are sure the media engine is
+ // playing the media.
+ if (timeupdateEventCount == 2) {
+ consoleWrite("");
+ testExpected("video.paused", false);
+ // make sure time is advancing and seek past end
+ testExpected("mediaElement.currentTime", 0, '>');
+ run("video.currentTime = 500");
+ setTimeout(seekCheck, 200);
+ }
}
- function timeCheck2()
+ function seekCheck()
{
consoleWrite("");
testExpected("video.paused", false);
testExpected("mediaElement.currentTime", 0, '>');
consoleWrite("");
+ // reset the counter to prevent infinite loop if the
+ // test is re-executed manually.
+ timeupdateEventCount = 0;
endTest();
}
+ mediaElement.addEventListener("timeupdate", timeupdate);
var mediaFile = findMediaFile("video", "content/test");
run("video.src = '" + mediaFile + "'");
consoleWrite("");
</script>
+ </body>
+</html>
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list