| <title>Test pause() pauses the clock immediately</title> |
| <script src=media-file.js></script> |
| <script src=video-test.js></script> |
| video.src = findMediaFile("video", "content/test"); |
| waitForEvent("canplay", canplay); |
| waitForEvent("playing", playing); |
| waitForEvent("pause", pause); |
| video.addEventListener("timeupdate", timeupdate); |
| if (video.currentTime > 0) { |
| video.removeEventListener("timeupdate", timeupdate); |
| timeAfterPause = video.currentTime; |
| testExpected("(video.currentTime - timeAfterPause)", 0.0001, "<"); |
| testExpected("(video.played.end(0) - timeAfterPause)", 0.0001, "<"); |
| <p>Test that pausing the media element has an immediate effect on the clock.</p> |