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

Unified Diff: chrome/test/data/media/eme_player_js/test_app.js

Issue 332323003: Revert of Integrate browser tests with new EME player. (Closed) Base URL: http://git.chromium.org/chromium/src.git@eme_player
Patch Set: Created 6 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 side-by-side diff with in-line comments
Download patch
Index: chrome/test/data/media/eme_player_js/test_app.js
diff --git a/chrome/test/data/media/eme_player_js/test_app.js b/chrome/test/data/media/eme_player_js/test_app.js
index 7c431fb7fc1da64566fcdf569327f7f6cd1362e9..cacf3cc91a3a3e38787beae23014e954f6b94a83 100644
--- a/chrome/test/data/media/eme_player_js/test_app.js
+++ b/chrome/test/data/media/eme_player_js/test_app.js
@@ -8,12 +8,11 @@
this.video_ = null;
}
-TestApp.loadPlayer = function() {
+TestApp.play = function() {
if (this.video_) {
Utils.timeLog('Delete old video tag.');
- this.video_.pause();
+ this.video_.src = '';
this.video_.remove();
- delete(this.video_);
}
this.video_ = document.createElement('video');
@@ -30,46 +29,34 @@
}
Utils.timeLog('Using ' + videoPlayer.constructor.name);
var videoSpan = document.getElementById(VIDEO_ELEMENT_ID);
- if (videoSpan)
- videoSpan.appendChild(this.video_);
- else
- document.body.appendChild(this.video_);
+ videoSpan.appendChild(this.video_);
videoPlayer.init(this.video_);
- if (TestConfig.runFPS)
- FPSObserver.observe(this.video_);
-
+ FPSObserver.observe(this.video_);
this.video_.play();
- return this.video_;
};
TestApp.getPlayer = function() {
- // Update keySystem if using prefixed Clear Key since it is not available as a
- // separate key system to choose from; however it can be set in URL query.
+ var keySystem = TestConfig.keySystem;
var usePrefixedEME = TestConfig.usePrefixedEME;
- if (TestConfig.keySystem == CLEARKEY && usePrefixedEME)
+
+ // Update keySystem if using prefixed Clear Key since it is not available in
+ // as a separate key system to choose from.
+ if (keySystem == CLEARKEY && usePrefixedEME)
TestConfig.keySystem = PREFIXED_CLEARKEY;
- var keySystem = TestConfig.keySystem;
switch (keySystem) {
case WIDEVINE_KEYSYSTEM:
if (usePrefixedEME)
return new PrefixedWidevinePlayer();
return new WidevinePlayer();
- case PREFIXED_CLEARKEY:
- return new PrefixedClearKeyPlayer();
case EXTERNAL_CLEARKEY:
case CLEARKEY:
if (usePrefixedEME)
return new PrefixedClearKeyPlayer();
return new ClearKeyPlayer();
- case FILE_IO_TEST_KEYSYSTEM:
- if (usePrefixedEME)
- return new FileIOTestPlayer();
default:
- Utils.timeLog(keySystem + ' is not a known key system');
- if (usePrefixedEME)
- return new PrefixedClearKeyPlayer();
- return new ClearKeyPlayer();
+ Utils.timeLog(keySystem + ' is not a supported system yet.');
+ return null;
}
};
« no previous file with comments | « chrome/test/data/media/eme_player_js/prefixed_widevine_player.js ('k') | chrome/test/data/media/eme_player_js/test_config.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698