OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <html> | 2 <html> |
3 <head> | 3 <head> |
4 <script src=media-file.js></script> | 4 <script src=media-file.js></script> |
5 <!-- TODO(philipj): Convert test to testharness.js. crbug.com/588956 | 5 <!-- TODO(foolip): Convert test to testharness.js. crbug.com/588956 |
6 (Please avoid writing new tests using video-test.js) --> | 6 (Please avoid writing new tests using video-test.js) --> |
7 <script src=video-test.js></script> | 7 <script src=video-test.js></script> |
8 <script> | 8 <script> |
9 function init() { | 9 function init() { |
10 findMediaElement(); | 10 findMediaElement(); |
11 waitForEvent('canplaythrough', receivedCanPlayThrough); | 11 waitForEvent('canplaythrough', receivedCanPlayThrough); |
12 video.src = findMediaFile("video", "content/test"); | 12 video.src = findMediaFile("video", "content/test"); |
13 } | 13 } |
14 | 14 |
15 function receivedCanPlayThrough() { | 15 function receivedCanPlayThrough() { |
16 waitForEvent('play', receivedPlay); | 16 waitForEvent('play', receivedPlay); |
17 video.playbackRate = 0; | 17 video.playbackRate = 0; |
18 video.play(); | 18 video.play(); |
19 } | 19 } |
20 | 20 |
21 function receivedPlay() { | 21 function receivedPlay() { |
22 waitForEventAndEnd('timeupdate'); | 22 waitForEventAndEnd('timeupdate'); |
23 video.playbackRate = 1; | 23 video.playbackRate = 1; |
24 } | 24 } |
25 </script> | 25 </script> |
26 </head> | 26 </head> |
27 <body onload="init()"> | 27 <body onload="init()"> |
28 <video controls></video> | 28 <video controls></video> |
29 <p>Test that setting a non-zero rate causes an async timeupdate event.</
p> | 29 <p>Test that setting a non-zero rate causes an async timeupdate event.</
p> |
30 </body> | 30 </body> |
31 </html> | 31 </html> |
OLD | NEW |