mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 493431 - Add test to ensure video file with more audio than video plays and that video.currentTime only increases during playback. r=n/a
This commit is contained in:
parent
59e83ae8e9
commit
3bb5eed6a2
@ -127,6 +127,7 @@ _TEST_FILES += \
|
||||
bug504644.ogv \
|
||||
bug506094.ogv \
|
||||
seek.ogv \
|
||||
short-video.ogv \
|
||||
small-shot.ogg \
|
||||
sound.ogg \
|
||||
$(NULL)
|
||||
|
@ -32,6 +32,8 @@ var gPlayTests = [
|
||||
{ name:"bug500311.ogv", type:"video/ogg", duration:1.96 },
|
||||
// Small audio file
|
||||
{ name:"small-shot.ogg", type:"video/ogg" },
|
||||
// More audio in file than video.
|
||||
{ name: "short-video.ogv", type:"video/ogg", duration:1.081 },
|
||||
|
||||
{ name:"bogus.duh", type:"bogus/duh" }
|
||||
];
|
||||
|
BIN
content/media/test/short-video.ogv
Normal file
BIN
content/media/test/short-video.ogv
Normal file
Binary file not shown.
@ -52,8 +52,16 @@ function startTests() {
|
||||
setTimeout(startTests, 0);
|
||||
}
|
||||
}}(test, v);
|
||||
v.prevTime = 0;
|
||||
var timeUpdate = function(v) { return function() {
|
||||
ok(v.prevTime <= v.currentTime,
|
||||
test.name + " time should run forwards: p=" +
|
||||
v.prevTime + " c=" + v.currentTime);
|
||||
v.prevTime = v.currentTime;
|
||||
}}(v);
|
||||
v.addEventListener("loadedmetadata", check, false);
|
||||
v.addEventListener("ended", checkEnded, false);
|
||||
v.addEventListener("timeupdate", timeUpdate, false);
|
||||
++testsWaiting;
|
||||
document.body.appendChild(v);
|
||||
v.play();
|
||||
|
Loading…
Reference in New Issue
Block a user