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

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

Issue 308553002: Integrate browser tests with new EME player. (Closed) Base URL: http://git.chromium.org/chromium/src.git@eme_player
Patch Set: nits (small change to EME versions UI) 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/file_io_test_player.js
diff --git a/chrome/test/data/media/eme_player_js/file_io_test_player.js b/chrome/test/data/media/eme_player_js/file_io_test_player.js
new file mode 100644
index 0000000000000000000000000000000000000000..5568818804eb003a5f4929d965781269613dce87
--- /dev/null
+++ b/chrome/test/data/media/eme_player_js/file_io_test_player.js
@@ -0,0 +1,28 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// File IO test player is used to test File IO CDM functionality.
+function FileIOTestPlayer() {
+}
+
+FileIOTestPlayer.prototype.init = function(video) {
+ InitPrefixedEMEPlayer(this, video);
+};
+
+FileIOTestPlayer.prototype.onWebkitKeyMessage = function(message) {
+ // The test result is either '0' or '1' appended to the header.
+ if (Utils.hasPrefix(message.message, FILE_IO_TEST_RESULT_HEADER)) {
+ if (message.message.length != FILE_IO_TEST_RESULT_HEADER.length + 1) {
+ Utils.failTest('Unexpected FileIOTest CDM message' + message.message);
+ return;
+ }
+ var result_index = FILE_IO_TEST_RESULT_HEADER.length;
+ var success = String.fromCharCode(message.message[result_index]) == 1;
+ Utils.timeLog('CDM file IO test: ' + (success ? 'Success' : 'Fail'));
+ if (success)
+ Utils.setResultInTitle(FILE_IO_TEST_SUCCESS);
+ else
+ Utils.failTest('File IO CDM message fail status.');
+ }
+};
« no previous file with comments | « chrome/test/data/media/eme_player_js/clearkey_player.js ('k') | chrome/test/data/media/eme_player_js/globals.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698