| <!DOCTYPE html><!-- webkit-test-runner [ enableModernMediaControls=false ] --> |
| <p>This tests if media controls shows up and timeline is accordingly updated after playing the video.</p> |
| <script src=media-file.js></script> |
| <script src=video-test.js></script> |
| <script src=media-controls.js></script> |
| var timeline = mediaControlsElement(internals.shadowRoot(video).firstChild.firstChild, '-webkit-media-controls-timeline'); |
| throw "Failed to find -webkit-media-controls-timeline"; |
| function canplaythrough() |
| if (!window.testRunner) { |
| testExpected("timeLineValue()", 0); |
| run('video.fastSeek(video.duration - 1)'); |
| // timeLineValue returns a two decimal value. |
| test("Math.floor(video.currentTime * 100) / 100 == timeLineValue()"); |
| video.src = findMediaFile("video", "content/test"); |
| waitForEvent("canplaythrough", canplaythrough); |
| waitForEvent("seeked", seeked); |
| waitForEvent("pause", paused); |
| waitForEventAndFail("error"); |