Index: LayoutTests/media/controls-timeline-with-controller.html |
diff --git a/LayoutTests/media/controls-timeline-with-controller.html b/LayoutTests/media/controls-timeline-with-controller.html |
new file mode 100644 |
index 0000000000000000000000000000000000000000..c861001de83a735c29cc96f812ad2da08598e51d |
--- /dev/null |
+++ b/LayoutTests/media/controls-timeline-with-controller.html |
@@ -0,0 +1,37 @@ |
+<!doctype html> |
+<html> |
+ <head> |
+ <title>media controls timeline with MediaController</title> |
+ <script src="media-file.js"></script> |
+ <script src="media-controls.js"></script> |
+ <script src="video-test.js"></script> |
+ </head> |
+ <body> |
+ <video controls></video> |
+ <script> |
+ findMediaElement(); |
+ video.controller = new MediaController(); |
+ video.src = findMediaFile("video", "content/test"); |
+ waitForEvent("loadedmetadata", function() |
+ { |
+ testExpected("video.controller.currentTime", 0); |
+ testExpected("video.currentTime", 0); |
+ testExpected("video.seeking", false); |
+ |
+ // click the middle of the timeline |
+ var coords = mediaControlsButtonCoordinates(video, "timeline"); |
+ eventSender.mouseMoveTo(coords[0], coords[1]); |
+ eventSender.mouseDown(); |
+ eventSender.mouseUp(); |
+ |
+ testExpected("video.controller.currentTime / video.controller.duration", 0.4, '>'); |
+ testExpected("video.controller.currentTime / video.controller.duration", 0.6, '<'); |
+ testExpected("video.currentTime / video.duration", 0.4, '>'); |
+ testExpected("video.currentTime / video.duration", 0.6, '<'); |
+ testExpected("video.seeking", true); |
+ |
+ endTest(); |
+ }); |
+ </script> |
+ </body> |
+</html> |