Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 <html> | |
|
scherkus (not reviewing)
2014/08/22 01:07:34
add <!DOCTYPE html> -- the official doctype of htm
DaleCurtis
2014/08/22 01:55:07
Done.
| |
| 2 <head> | |
|
scherkus (not reviewing)
2014/08/22 01:07:33
nit: drop empty head
DaleCurtis
2014/08/22 01:55:08
Done.
| |
| 3 </head> | |
| 4 <body onload="start()"> | |
| 5 <p>Load a video via preloading; verify infinite duration. Start playback and | |
|
scherkus (not reviewing)
2014/08/22 01:07:33
Prehaps rewords this to say "loading a file with u
DaleCurtis
2014/08/22 01:55:08
Done.
| |
| 6 ensure currentTime < end of the buffered range upon first timeupdate.</p> | |
| 7 <video id="video" preload="auto"></video> | |
|
scherkus (not reviewing)
2014/08/22 01:07:34
nit: no need for an id
scherkus (not reviewing)
2014/08/22 01:07:34
nit: default preload attribute is auto
DaleCurtis
2014/08/22 01:55:07
Done.
DaleCurtis
2014/08/22 01:55:08
Done.
| |
| 8 <script src=../../media-resources/video-test.js></script> | |
|
scherkus (not reviewing)
2014/08/22 01:07:33
nit: "" all attribute strings
DaleCurtis
2014/08/22 01:55:08
Done.
| |
| 9 <script src=../../media-resources/media-file.js></script> | |
| 10 <script> | |
| 11 waitForEventOnce('timeupdate', function() { | |
| 12 video.pause(); | |
| 13 | |
| 14 testExpected("video.duration", Infinity, "=="); | |
|
scherkus (not reviewing)
2014/08/22 01:07:34
nit: javascript uses ' over " for all strings
DaleCurtis
2014/08/22 01:55:07
Done.
| |
| 15 testExpected("video.buffered.start(0)", 0, ">="); | |
| 16 | |
| 17 // 1000 arbitrarily chosen, just some value > duration for testing for | |
|
scherkus (not reviewing)
2014/08/22 01:07:34
would duration + 1 suffice?
or just compare > dur
DaleCurtis
2014/08/22 01:55:07
I want it to be immune to any future minor changes
| |
| 18 // overflow of an infinite duration. | |
| 19 testExpected("video.buffered.end(0)", 1000, "<"); | |
| 20 test("video.currentTime <= video.buffered.end(0)", true); | |
|
scherkus (not reviewing)
2014/08/22 01:07:34
boy oh boy does video-test.js contain some real ge
DaleCurtis
2014/08/22 01:55:07
Don't want to use testExpected() since it will pri
| |
| 21 }); | |
| 22 | |
| 23 waitForEventOnce('loadeddata', function() { | |
| 24 testExpected("video.buffered.length", 1, "=="); | |
| 25 testExpected("video.buffered.start(0)", 0, ">="); | |
| 26 testExpected("video.buffered.end(0)", Infinity, "!="); | |
| 27 testExpected("video.currentTime", 0, "=="); | |
| 28 testExpected("video.duration", Infinity, "=="); | |
| 29 video.play(); | |
| 30 }); | |
| 31 | |
| 32 function start () { | |
|
scherkus (not reviewing)
2014/08/22 01:07:33
nit: remove space before ()
DaleCurtis
2014/08/22 01:55:08
Done.
| |
| 33 video = document.getElementById('video'); | |
|
scherkus (not reviewing)
2014/08/22 01:07:34
funny enough by loading the video-test.js script i
DaleCurtis
2014/08/22 01:55:08
Done.
| |
| 34 video.src = "http://127.0.0.1:8000/media/video-throttled-load.cgi?nph=1& name=resources/test-live.webm&throttle=100&type=video/webm"; | |
|
scherkus (not reviewing)
2014/08/22 01:07:33
do you need to run this through the cgi?
would po
DaleCurtis
2014/08/22 01:55:08
Looks like it works either way, moved.
| |
| 35 } | |
| 36 </script> | |
| 37 </body> | |
| 38 </html> | |
| OLD | NEW |