OLD | NEW |
1 <!doctype html> | 1 <!doctype html> |
2 <html> | 2 <html> |
3 <head> | 3 <head> |
4 <title>media controls timeline</title> | 4 <title>media controls timeline</title> |
5 <script src="media-file.js"></script> | 5 <script src="media-file.js"></script> |
6 <script src="media-controls.js"></script> | 6 <script src="media-controls.js"></script> |
| 7 <!-- TODO(philipj): Convert test to testharness.js. crbug.com/588956 |
| 8 (Please avoid writing new tests using video-test.js) --> |
7 <script src="video-test.js"></script> | 9 <script src="video-test.js"></script> |
8 </head> | 10 </head> |
9 <body> | 11 <body> |
10 <video controls></video> | 12 <video controls></video> |
11 <script> | 13 <script> |
12 findMediaElement(); | 14 findMediaElement(); |
13 video.src = findMediaFile("video", "content/test"); | 15 video.src = findMediaFile("video", "content/test"); |
14 waitForEvent("loadedmetadata", function() | 16 waitForEvent("loadedmetadata", function() |
15 { | 17 { |
16 testExpected("video.currentTime", 0); | 18 testExpected("video.currentTime", 0); |
17 testExpected("video.seeking", false); | 19 testExpected("video.seeking", false); |
18 | 20 |
19 // click the middle of the timeline | 21 // click the middle of the timeline |
20 var coords = mediaControlsButtonCoordinates(video, "timeline"); | 22 var coords = mediaControlsButtonCoordinates(video, "timeline"); |
21 eventSender.mouseMoveTo(coords[0], coords[1]); | 23 eventSender.mouseMoveTo(coords[0], coords[1]); |
22 eventSender.mouseDown(); | 24 eventSender.mouseDown(); |
23 eventSender.mouseUp(); | 25 eventSender.mouseUp(); |
24 | 26 |
25 testExpected("video.currentTime / video.duration", 0.4, '>'); | 27 testExpected("video.currentTime / video.duration", 0.4, '>'); |
26 testExpected("video.currentTime / video.duration", 0.6, '<'); | 28 testExpected("video.currentTime / video.duration", 0.6, '<'); |
27 testExpected("video.seeking", true); | 29 testExpected("video.seeking", true); |
28 | 30 |
29 endTest(); | 31 endTest(); |
30 }); | 32 }); |
31 </script> | 33 </script> |
32 </body> | 34 </body> |
33 </html> | 35 </html> |
OLD | NEW |