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

Side by Side Diff: content/test/data/media/media_source_player.html

Issue 408993002: Have media content and chrome browser tests load data from media/test/data (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
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="media_utils.js" type="text/javascript"></script>
9 <script src="media_source_utils.js" type="text/javascript"></script>
10 <script type="text/javascript">
11 var video = document.querySelector('video');
12
13 function onTimeUpdate() {
14 video.removeEventListener('timeupdate', onTimeUpdate);
15 video.currentTime = 0.9 * video.duration;
16 }
17
18 function onSeeked() {
19 video.removeEventListener('ended', failTest);
20 installTitleEventHandler(video, 'ended');
21 }
22
23 // The test completes after media starts playing, seeks to 0.9 of
24 // duration and fires the ended event.
25 // The test stops when an error or ended event fire unexpectedly.
26 function runTest() {
27 loadMediaFromURL(video);
28 video.addEventListener('ended', failTest);
29 video.addEventListener('seeked', onSeeked);
30 video.addEventListener('timeupdate', onTimeUpdate);
31 video.play();
32 }
33 </script>
34 </body>
35 </html>
OLDNEW
« no previous file with comments | « content/test/data/media/encrypted_media_utils.js ('k') | content/test/data/media/media_source_utils.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698