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

Side by Side Diff: chrome/test/data/media/html/media_event.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: Add basic media track event test in media functional test. 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
« no previous file with comments | « no previous file | chrome/test/functional/PYAUTO_TESTS » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 <!-- 1 <!--
2 This HTML file contains a div for a player which is used for event testing 2 This HTML file contains a div for a player which is used for event testing
3 (chrome/test/functional/media_event_*.py). 3 (chrome/test/functional/media_event_*.py).
4 The query string should contain the following information: 4 The query string should contain the following information:
5 tag (required): HTML video/audio tag. 5 tag (required): HTML video/audio tag.
6 video file (required): video file name. 6 video file (required): video file name.
7 t (optional): if specified, disables the media cache. 7 t (optional): if specified, disables the media cache.
8 actions (optional): add a list of triples (time, action, action_argument) 8 actions (optional): add a list of triples (time, action, action_argument)
9 delimited by '|'. For example, '3000|seek|5000' means 'at second 3, seek 9 delimited by '|'. For example, '3000|seek|5000' means 'at second 3, seek
10 to second 5'. Possible actions are 'play', 'pause', 'seek', or 10 to second 5'. Possible actions are 'play', 'pause', 'seek', or
11 'ratechange'. Time and action_arugment is in milliseconds. 'play' and 11 'ratechange'. Time and action_arugment is in milliseconds. 'play' and
12 'pause' should have dummy action_argument, which is ignored. 12 'pause' should have dummy action_argument, which is ignored.
13 13
14 Example: "media_event.html?tag=video&media=foo.webm&t=t&actions=3000|seek|5000" 14 Example: "media_event.html?tag=video&media=foo.webm&t=t&actions=3000|seek|5000"
15 --> 15 -->
16 <html> 16 <html>
17 <body> 17 <body>
18 <div id='player_container'></div> 18 <div id='player_container'></div>
19 <script type='text/javascript' src='player.js'></script> 19 <script type='text/javascript' src='player.js'></script>
20 <script> 20 <script>
21 var events = ['abort', 'canplay', 'canplaythrough', 'durationchange', 'emptied', 21 var events = ['abort', 'canplay', 'canplaythrough', 'durationchange', 'emptied',
22 'ended', 'error', 'load', 'loadeddata', 'loadedmetadata', 22 'ended', 'error', 'load', 'loadeddata', 'loadedmetadata',
23 'loadstart', 'pause', 'play', 'playing', 'progress', 23 'loadstart', 'pause', 'play', 'playing', 'progress',
24 'ratechange', 'seeked', 'seeking', 'stalled', 'suspend', 24 'ratechange', 'seeked', 'seeking', 'stalled', 'suspend',
25 'timeupdate', 'volumechange', 'waiting'] 25 'timeupdate', 'volumechange', 'waiting',
26 'cuechange', 'enter', 'exit', 'change'];
26 27
27 var startTime = 0 28 var startTime = 0
28 29
29 var table = document.createElement('table'); 30 var table = document.createElement('table');
30 table.id = 'event'; 31 table.id = 'event';
31 document.body.appendChild(table); 32 document.body.appendChild(table);
32 33
33 function recordEventTime(evt) { 34 function recordEventTime(evt) {
34 // Record the time when an event happens. 35 // Record the time when an event happens.
35 var time = new Date().getTime() - startTime 36 var time = new Date().getTime() - startTime
(...skipping 16 matching lines...) Expand all
52 } 53 }
53 54
54 if (ok) { 55 if (ok) {
55 startTime = new Date().getTime(); 56 startTime = new Date().getTime();
56 player.play(); 57 player.play();
57 } 58 }
58 </script> 59 </script>
59 </body> 60 </body>
60 </html> 61 </html>
61 62
OLDNEW
« no previous file with comments | « no previous file | chrome/test/functional/PYAUTO_TESTS » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698