| <!DOCTYPE html><!-- webkit-test-runner [ enableModernMediaControls=false ] --> |
| <p>This tests if media controls timeline is properly updated when a cursor hovers the controls during playback.</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); |
| playButtonCoords = mediaControlsButtonCoordinates(video, "play-button"); |
| eventSender.mouseMoveTo(playButtonCoords[0], playButtonCoords[1]); |
| video.addEventListener("timeupdate", function() { |
| if (video.currentTime >= 1) { |
| consoleWrite("EVENT(timeupdate)"); |
| test("timeLineValue() >= 1"); |
| video.src = findMediaFile("video", "content/test"); |
| waitForEvent("canplaythrough", canplaythrough); |
| waitForEventAndFail("error"); |