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

Side by Side Diff: trunk/src/media/test/data/media_source_player.html

Issue 383063009: Revert 282795 "Have media content and chrome browser tests load ..." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 6 years, 5 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 <!DOCTYPE html>
2 <html>
3 <head>
4 <title>Media Source Player</title>
5 </head>
6 <body onload="runTest();">
7 <video controls></video>
8 <script src='eme_player_js/app_loader.js' type='text/javascript'></script>
9 <script type="text/javascript">
10 var video = document.querySelector('video');
11
12 function onTimeUpdate() {
13 video.removeEventListener('timeupdate', onTimeUpdate);
14 video.currentTime = 0.9 * video.duration;
15 }
16
17 function onSeeked() {
18 video.removeEventListener('ended', Utils.failTest);
19 Utils.installTitleEventHandler(video, 'ended');
20 }
21
22 // The test completes after media starts playing, seeks to 0.9 of
23 // duration and fires the ended event.
24 // The test stops when an error or ended event fire unexpectedly.
25 function runTest() {
26 var testConfig = new TestConfig();
27 testConfig.loadQueryParams();
28 Utils.installTitleEventHandler(video, 'error');
29 video.addEventListener('ended', Utils.failTest);
30 video.addEventListener('seeked', onSeeked);
31 video.addEventListener('timeupdate', onTimeUpdate);
32 var source = MediaSourceUtils.loadMediaSourceFromTestConfig(testConfig);
33 video.src = window.URL.createObjectURL(source);
34 video.play();
35 }
36 </script>
37 </body>
38 </html>
OLDNEW
« no previous file with comments | « trunk/src/media/test/data/encrypted_frame_size_change.html ('k') | trunk/src/media/test/data/mse_config_change.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698