Fix seeking tests to avoid false assumptions

This commit is contained in:
Robert O'Callahan 2009-05-18 12:25:05 +12:00
parent 7ec7418b2e
commit 12cba926fb
2 changed files with 5 additions and 2 deletions

View File

@ -51,7 +51,10 @@ function seekEnded() {
var v = document.getElementById('v');
var t = v.currentTime;
ok(t >= 2 && t <= 3, "Video currentTime should be around 2: " + t);
// Since we were playing, and we only paused asynchronously, we can't be
// sure that we paused before the seek finished, so we may have played
// ahead arbitrarily far.
ok(t >= 1.9, "Video currentTime should be around 2: " + t);
v.play();
endPassed = true;
seekFlagEnd = v.seeking;

View File

@ -40,7 +40,7 @@ function seekEnded() {
return false;
var t = document.getElementById('v').currentTime;
ok(t >= 2 && t<= 3, "Video currentTime should be around 2: " + t);
ok(t >= 1.9 && t <= 2.1, "Video currentTime should be around 2: " + t);
completed = true;
SimpleTest.finish();
return false;