| 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 |
| 6 (Please avoid writing new tests using video-test.js) --> |
| 5 <script src=video-test.js></script> | 7 <script src=video-test.js></script> |
| 6 <script> | 8 <script> |
| 7 function onWindowLoad(e) | 9 function onWindowLoad(e) |
| 8 { | 10 { |
| 9 video = document.getElementById('video'); | 11 video = document.getElementById('video'); |
| 10 | 12 |
| 11 video.src = findMediaFile("video", "content/test"); | 13 video.src = findMediaFile("video", "content/test"); |
| 12 testExpected("video.currentTime", 0); | 14 testExpected("video.currentTime", 0); |
| 13 video.currentTime = 1; | 15 video.currentTime = 1; |
| 14 testExpected("video.currentTime", 1); | 16 testExpected("video.currentTime", 1); |
| 15 | 17 |
| 16 waitForEvent('loadedmetadata', function() | 18 waitForEvent('loadedmetadata', function() |
| 17 { | 19 { |
| 18 testExpected("video.currentTime", 1); | 20 testExpected("video.currentTime", 1); |
| 19 }); | 21 }); |
| 20 | 22 |
| 21 waitForEventAndEnd('seeked'); | 23 waitForEventAndEnd('seeked'); |
| 22 } | 24 } |
| 23 | 25 |
| 24 window.addEventListener('load', onWindowLoad, false); | 26 window.addEventListener('load', onWindowLoad, false); |
| 25 </script> | 27 </script> |
| 26 </head> | 28 </head> |
| 27 <body> | 29 <body> |
| 28 <video controls id="video"></video> | 30 <video controls id="video"></video> |
| 29 <p>Test currentTime values when setting while HAVE_NOTHING.</p> | 31 <p>Test currentTime values when setting while HAVE_NOTHING.</p> |
| 30 <br/> | 32 <br/> |
| 31 </body> | 33 </body> |
| 32 </html> | 34 </html> |
| OLD | NEW |