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

Side by Side Diff: media/test/data/eme_player_js/file_io_test_player.js

Issue 2095963004: Revert of media: Add OutputProtectionProxy (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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 unified diff | Download patch
« no previous file with comments | « media/test/data/eme_player_js/app_loader.js ('k') | media/test/data/eme_player_js/globals.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 // File IO test player is used to test File IO CDM functionality.
6 function FileIOTestPlayer(video, testConfig) {
7 this.video = video;
8 this.testConfig = testConfig;
9 }
10
11 FileIOTestPlayer.prototype.init = function() {
12 // Returns a promise.
13 return PlayerUtils.initEMEPlayer(this);
14 };
15
16 FileIOTestPlayer.prototype.registerEventListeners = function() {
17 // Returns a promise.
18 return PlayerUtils.registerEMEEventListeners(this);
19 };
20
21 handleMessage = function(message) {
22 // The test result is either '0' or '1' appended to the header.
23 var msg = Utils.convertToUint8Array(message.message);
24 if (Utils.hasPrefix(msg, FILE_IO_TEST_RESULT_HEADER)) {
25 if (msg.length != FILE_IO_TEST_RESULT_HEADER.length + 1) {
26 Utils.failTest('Unexpected FileIOTest CDM message' + msg);
27 return;
28 }
29 var result_index = FILE_IO_TEST_RESULT_HEADER.length;
30 var success = String.fromCharCode(msg[result_index]) == 1;
31 Utils.timeLog('CDM file IO test: ' + (success ? 'Success' : 'Fail'));
32 if (success)
33 Utils.setResultInTitle(FILE_IO_TEST_SUCCESS);
34 else
35 Utils.failTest('File IO CDM message fail status.');
36 }
37 };
38
39 FileIOTestPlayer.prototype.onMessage = handleMessage;
OLDNEW
« no previous file with comments | « media/test/data/eme_player_js/app_loader.js ('k') | media/test/data/eme_player_js/globals.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698