| <script src=media-file.js></script> |
| <script src=video-test.js></script> |
| waitForEvent('playing', function() { |
| if (++countPlaying > 2) { |
| logResult(false, 'FAIL: playing fired more then twice.'); |
| testExpected('video.currentTime.toFixed(2)', seekTarget, '=='); |
| waitForEventOnce('ended', function() { |
| video.currentTime = seekTarget; |
| waitForEventOnce('seeked', function() { video.play(); }) |
| video.currentTime = video.duration - 0.2; |
| video.src = findMediaFile('video', 'content/test'); |
| logResult(false, 'FAIL: timeout'); |
| <p>Test that we can seek after reached the end of the video.</p> |