Bug 475441. Fix tests that assume a 'playing' event will be sent when we replay after playback has ended. r=doublec

This commit is contained in:
Robert O'Callahan 2009-04-01 14:07:17 +13:00
parent 7d5620c7aa
commit 76cc4c16be
5 changed files with 5 additions and 8 deletions

View File

@ -24,6 +24,7 @@ function playbackEnded() {
"Checking currentTime at end: " + v.currentTime); "Checking currentTime at end: " + v.currentTime);
ok(v.ended, "Checking playback has ended"); ok(v.ended, "Checking playback has ended");
v.pause();
v.currentTime = 0; v.currentTime = 0;
ok(!v.ended, "Checking ended is no longer true"); ok(!v.ended, "Checking ended is no longer true");
haveSeeked = true; haveSeeked = true;

View File

@ -43,9 +43,8 @@ function playbackEnded() {
ok(v.currentTime >= 3.9 && v.currentTime <= 4.0, ok(v.currentTime >= 3.9 && v.currentTime <= 4.0,
"Checking currentTime at end: " + v.currentTime); "Checking currentTime at end: " + v.currentTime);
ok(v.ended, "Checking playback has ended"); ok(v.ended, "Checking playback has ended");
ok(playingCount > 0, "Expect at least one playing event");
playingCount = 0;
if (endCount < 2) { if (endCount < 2) {
ok(playingCount > 0, "Expect at least one playing event");
v.currentTime = 0; v.currentTime = 0;
ok(v.seeking, "Checking that seeking is now true"); ok(v.seeking, "Checking that seeking is now true");
ok(!v.ended, "Checking ended is no longer set as seeking has begun"); ok(!v.ended, "Checking ended is no longer set as seeking has begun");

View File

@ -43,9 +43,8 @@ function playbackEnded() {
ok(v.currentTime >= 0.9 && v.currentTime <= 1.1, ok(v.currentTime >= 0.9 && v.currentTime <= 1.1,
"Checking currentTime at end: " + v.currentTime); "Checking currentTime at end: " + v.currentTime);
ok(v.ended, "Checking playback has ended"); ok(v.ended, "Checking playback has ended");
ok(playingCount > 0, "Expect at least one playing event");
playingCount = 0;
if (endCount < 2) { if (endCount < 2) {
ok(playingCount > 0, "Expect at least one playing event");
v.currentTime = 0; v.currentTime = 0;
ok(v.seeking, "Checking that seeking is now true"); ok(v.seeking, "Checking that seeking is now true");
ok(!v.ended, "Checking ended is no longer set as seeking has begun"); ok(!v.ended, "Checking ended is no longer set as seeking has begun");

View File

@ -39,9 +39,8 @@ function playbackEnded() {
ok(v.currentTime >= 3.9 && v.currentTime <= 4.0, ok(v.currentTime >= 3.9 && v.currentTime <= 4.0,
"Checking currentTime at end: " + v.currentTime); "Checking currentTime at end: " + v.currentTime);
ok(v.ended, "Checking playback has ended"); ok(v.ended, "Checking playback has ended");
ok(playingCount > 0, "Expect at least one playing event");
playingCount = 0;
if (endCount < 2) { if (endCount < 2) {
ok(playingCount > 0, "Expect at least one playing event");
v.play(); v.play();
} else { } else {
ok(endCount == 2, "Check playback after ended event"); ok(endCount == 2, "Check playback after ended event");

View File

@ -40,9 +40,8 @@ function playbackEnded() {
ok(v.currentTime >= 0.9 && v.currentTime <= 1.1, ok(v.currentTime >= 0.9 && v.currentTime <= 1.1,
"Checking currentTime at end: " + v.currentTime); "Checking currentTime at end: " + v.currentTime);
ok(v.ended, "Checking playback has ended"); ok(v.ended, "Checking playback has ended");
ok(playingCount > 0, "Expect at least one playing event");
playingCount = 0;
if (endCount < 2) { if (endCount < 2) {
ok(playingCount > 0, "Expect at least one playing event");
v.play(); v.play();
} else { } else {
ok(endCount == 2, "Check playback after ended event"); ok(endCount == 2, "Check playback after ended event");