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

Unified Diff: media/test/data/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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « media/test/data/encrypted_frame_size_change.html ('k') | media/test/data/mse_config_change.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/test/data/media_source_player.html
diff --git a/content/test/data/media/media_source_player.html b/media/test/data/media_source_player.html
similarity index 60%
rename from content/test/data/media/media_source_player.html
rename to media/test/data/media_source_player.html
index 97f3b64dee183683df2c51c920ff5f687d37ec4b..7a2ecbedf5717e698e703f739d6638200311f5ed 100644
--- a/content/test/data/media/media_source_player.html
+++ b/media/test/data/media_source_player.html
@@ -5,8 +5,7 @@
</head>
<body onload="runTest();">
<video controls></video>
- <script src="media_utils.js" type="text/javascript"></script>
- <script src="media_source_utils.js" type="text/javascript"></script>
+ <script src='eme_player_js/app_loader.js' type='text/javascript'></script>
<script type="text/javascript">
var video = document.querySelector('video');
@@ -16,18 +15,22 @@
}
function onSeeked() {
- video.removeEventListener('ended', failTest);
- installTitleEventHandler(video, 'ended');
+ video.removeEventListener('ended', Utils.failTest);
+ Utils.installTitleEventHandler(video, 'ended');
}
// The test completes after media starts playing, seeks to 0.9 of
// duration and fires the ended event.
// The test stops when an error or ended event fire unexpectedly.
function runTest() {
- loadMediaFromURL(video);
- video.addEventListener('ended', failTest);
+ var testConfig = new TestConfig();
+ testConfig.loadQueryParams();
+ Utils.installTitleEventHandler(video, 'error');
+ video.addEventListener('ended', Utils.failTest);
video.addEventListener('seeked', onSeeked);
video.addEventListener('timeupdate', onTimeUpdate);
+ var source = MediaSourceUtils.loadMediaSourceFromTestConfig(testConfig);
+ video.src = window.URL.createObjectURL(source);
video.play();
}
</script>
« no previous file with comments | « media/test/data/encrypted_frame_size_change.html ('k') | media/test/data/mse_config_change.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698