| <!DOCTYPE html> |
| <html> |
| <head> |
| <script src=media-file.js></script> |
| <script src=video-test.js></script> |
| <script> |
| var timeUpdateWasCalled = false; |
| var startTime = NaN; |
| function start() |
| { |
| findMediaElement(); |
| video.src = findMediaFile("video", "content/test"); |
| waitForEventAndFail('ended'); |
| video.addEventListener('timeupdate', timeupdate); |
| waitForEventOnce('canplaythrough', canPlayThrough); |
| } |
| |
| function canPlayThrough() |
| { |
| video.playbackRate = 0; |
| startTime = video.currentTime; |
| setTimeout("checkplayback()", 250); |
| video.play(); |
| } |
| |
| function timeupdate() |
| { |
| if (video.currentTime != startTime) |
| failTest("Time was updated, but should not change."); |
| } |
| |
| function checkplayback() |
| { |
| testExpected('video.currentTime', 0); |
| testExpected('video.paused', false); |
| endTest(); |
| } |
| </script> |
| </head> |
| <body onload="start()"> |
| <video></video> |
| <p>Test that setting '0' playbackRate works correctly.</p> |
| </body> |
| </html> |