Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 <!DOCTYPE html> | |
| 2 <html> | |
| 3 <head> | |
| 4 <script src=media-file.js></script> | |
| 5 <script src=video-test.js></script> | |
| 6 <script> | |
| 7 var video2; | |
|
philipj_slow
2014/09/10 12:25:48
Don't need these two vars, you need them to end up
amogh.bihani
2014/09/11 13:35:59
Done.
| |
| 8 var controller; | |
| 9 function onWindowLoad() | |
| 10 { | |
| 11 video = document.getElementById('video1'); | |
|
philipj_slow
2014/09/10 12:25:48
I'd get rid of the ids and just use videos = getEl
amogh.bihani
2014/09/11 13:35:59
Done.
| |
| 12 video2 = document.getElementById('video2'); | |
| 13 run('controller = video.controller'); | |
|
philipj_slow
2014/09/10 12:25:48
why run?
amogh.bihani
2014/09/11 13:35:59
Dont know... it was getting timeout without this :
| |
| 14 | |
| 15 var src = findMediaFile("video", "content/test"); | |
| 16 video.src = src + "#t=2"; | |
| 17 video2.src = src; | |
| 18 testExpected("video.currentTime", 0); | |
| 19 testExpected("video2.currentTime", 0); | |
| 20 | |
| 21 controller.addEventListener('loadedmetadata', function() | |
| 22 { | |
| 23 testExpected("video.currentTime", 2); | |
| 24 testExpected("video2.currentTime", 2); | |
| 25 testExpected("controller.currentTime", 2); | |
| 26 }); | |
| 27 | |
| 28 waitForEvent('seeked', function() | |
|
philipj_slow
2014/09/10 12:25:48
waitForEventAndEnd("seeked")
amogh.bihani
2014/09/11 13:35:59
Done.
| |
| 29 { | |
| 30 endTest(); | |
| 31 }); | |
| 32 } | |
| 33 | |
| 34 window.addEventListener('load', onWindowLoad, false); | |
|
philipj_slow
2014/09/10 12:25:48
Many tests have a runTest function, I think that's
amogh.bihani
2014/09/11 13:35:59
Done.
| |
| 35 </script> | |
| 36 </head> | |
| 37 <body> | |
| 38 <p>Test currentTime of media controller when one of the element has init ial start time greater than 0.</p> | |
| 39 <video controls id="video1" mediaGroup="group"></video> | |
| 40 <video controls id="video2" mediaGroup="group"></video> | |
| 41 <br/> | |
| 42 </body> | |
| 43 </html> | |
| OLD | NEW |