Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(354)

Side by Side Diff: chrome/test/data/media/html/media_track.html

Issue 7003131: Adding HTML5 track(caption) test case in PyAuto media functional tests. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: adding title for video and set default track file. Created 9 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 <!--
2 This HTML file contains player a div which is used for track testing
annacc 2011/06/13 18:51:37 "contains a div for a player..." ?
imasaki1 2011/06/13 23:43:09 Done.
3 (chrome/test/functional/media_track.py). This file is modification of
4 http://www.annacavender.com/track/demo1/trackdemo.html.
5
6 The query string should contain the following information:
7 tag (optional): HTML video/audio tag (default is video).
8 media (required): media file name.
9 t (optional): add the "t" parameter to disable the media cache.
dennis_jeffrey 2011/06/13 22:51:49 "add the "t" parameter to disable the media cache.
imasaki1 2011/06/13 23:43:09 Done.
10 track (required): the name of the track file (inband).
annacc 2011/06/13 18:51:37 should say 'out-of-band'
imasaki1 2011/06/13 23:43:09 Done.
11
12 Example: "media_track.html?tag=video&media=foo.webm&track=track.vtt"
13 -->
14 <html>
15 <body onload="getTrackInfo()">
16 <div id='player_container'></div>
17 <textarea rows="50" cols="50" id="text"> Default text.
18 </textarea>
19 <script type='text/javascript' src='player.js'></script>
20 <script>
21 function getTrackInfo() {
22 var tr = document.getElementById('track');
23 var ta = document.getElementById('text');
24 ta.value = "track src = " + tr.src + "\n";
25 ta.value += "track srclang = " + tr.srclang + "\n";
26 ta.value += "track kind = " + tr.kind + "\n";
27 ta.value += "track label = " + tr.label + "\n";
28 ta.value += "track default = " + tr.getAttribute('default') + "\n\n";
29 ta.value += "CUES: (" + tr.track.cues.length + ")\n";
30 for (i = 0; i < tr.track.cues.length; i++) {
dennis_jeffrey 2011/06/13 22:51:49 nit: "var i = 0;"
imasaki1 2011/06/13 23:43:09 Done.
31 ta.value += tr.track.cues[i].id + ": ";
32 ta.value += tr.track.cues[i].startTime + " --> " + tr.track.cues[i].endTime + "\n";
Nirnimesh 2011/06/13 22:07:37 nit: 80+ lines
imasaki1 2011/06/13 23:43:09 Done.
33 ta.value += tr.track.cues[i].getCueAsSource() + "\n";
34 }
35 ta.value += "END\n";
36 }
37
38 if (ok) {
39 player.play();
annacc 2011/06/13 18:51:37 If you are only testing the attributes of <track>
imasaki1 2011/06/13 23:43:09 I want to play the video since it is used for perf
40 }
41 </script>
42 </body>
43
44
dennis_jeffrey 2011/06/13 22:51:49 nit: remove these two blank lines.
imasaki1 2011/06/13 23:43:09 Done.
45 </html>
46
dennis_jeffrey 2011/06/13 22:51:49 nit: remove this blank line.
imasaki1 2011/06/13 23:43:09 Done.
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698