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

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

Issue 9959028: Convert the media and audio UI test to a browser_test. browser_tests are sharded and run quicker, a… (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 years, 8 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 | « chrome/chrome_tests.gypi ('k') | content/browser/audio_browsertest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 <html> 1 <html>
2 <body> 2 <body>
3 <div id="player_container"></div> 3 <div id="player_container"></div>
4 <script> 4 <script>
5 var player = null; 5 var player = null;
6 function InstallEventHandler(event, action) { 6 function InstallEventHandler(event, action) {
7 player.addEventListener(event, function(e) { 7 player.addEventListener(event, function(e) {
8 eval(action); 8 eval(action);
9 }, false); 9 }, false);
10 } 10 }
(...skipping 10 matching lines...) Expand all
21 if (query_parts.length == 2) { 21 if (query_parts.length == 2) {
22 var tag = query_parts[0]; 22 var tag = query_parts[0];
23 var media_url = query_parts[1]; 23 var media_url = query_parts[1];
24 if (tag == 'audio' || tag == 'video') { 24 if (tag == 'audio' || tag == 'video') {
25 ok = true; 25 ok = true;
26 var container = document.getElementById('player_container'); 26 var container = document.getElementById('player_container');
27 container.innerHTML = '<' + tag + ' controls id="player"></' + tag + '>'; 27 container.innerHTML = '<' + tag + ' controls id="player"></' + tag + '>';
28 player = document.getElementById('player'); 28 player = document.getElementById('player');
29 29
30 // Install event handlers. 30 // Install event handlers.
31 InstallEventHandler('error', 31 InstallEventHandler('error', 'document.title = "ERROR"');
32 'document.title = "ERROR = " + player.error.code');
33 InstallEventHandler('playing', 'document.title = "PLAYING"'); 32 InstallEventHandler('playing', 'document.title = "PLAYING"');
34 33
35 // Starts the player. 34 // Starts the player.
36 player.src = media_url; 35 player.src = media_url;
37 player.play(); 36 player.play();
38 } 37 }
39 } 38 }
40 } 39 }
41 if (!ok) { 40 if (!ok) {
42 document.title = 'FAILED'; 41 document.title = 'FAILED';
43 } 42 }
44 </script> 43 </script>
45 </body> 44 </body>
46 </html> 45 </html>
OLDNEW
« no previous file with comments | « chrome/chrome_tests.gypi ('k') | content/browser/audio_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698