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

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

Issue 641443002: Add unprefixed EME tests for LoadSession() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: add TODO (plus rebase) Created 6 years, 2 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/player_utils.js ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // Test configuration used by test page to configure the player app and other 5 // Test configuration used by test page to configure the player app and other
6 // test specific configurations. 6 // test specific configurations.
7 function TestConfig() { 7 function TestConfig() {
8 this.mediaFile = null; 8 this.mediaFile = null;
9 this.keySystem = null; 9 this.keySystem = null;
10 this.mediaType = null; 10 this.mediaType = null;
(...skipping 10 matching lines...) Expand all
21 // space so decodeURIComponent functions properly. 21 // space so decodeURIComponent functions properly.
22 var decodeURI = function decodeURI(s) { 22 var decodeURI = function decodeURI(s) {
23 return decodeURIComponent(s.replace(/\+/g, ' ')); 23 return decodeURIComponent(s.replace(/\+/g, ' '));
24 }; 24 };
25 var match; 25 var match;
26 while (match = r.exec(window.location.search.substring(1))) 26 while (match = r.exec(window.location.search.substring(1)))
27 this[decodeURI(match[1])] = decodeURI(match[2]); 27 this[decodeURI(match[1])] = decodeURI(match[2]);
28 this.useMSE = this.useMSE == '1' || this.useMSE == 'true'; 28 this.useMSE = this.useMSE == '1' || this.useMSE == 'true';
29 this.usePrefixedEME = 29 this.usePrefixedEME =
30 this.usePrefixedEME == '1' || this.usePrefixedEME == 'true'; 30 this.usePrefixedEME == '1' || this.usePrefixedEME == 'true';
31
32 // Validate that the prefixed/unprefixed EME is available.
33 if (this.usePrefixedEME) {
34 if (EME_DISABLED_OPTIONS.indexOf(EME_PREFIXED_VERSION) >= 0)
35 Utils.failTest('Prefixed EME not available.')
36 } else {
37 if (EME_DISABLED_OPTIONS.indexOf(EME_UNPREFIXED_VERSION) >= 0)
38 Utils.failTest('Unprefixed EME not available.')
39 }
31 }; 40 };
32 41
33 TestConfig.updateDocument = function() { 42 TestConfig.updateDocument = function() {
34 this.loadQueryParams(); 43 this.loadQueryParams();
35 Utils.addOptions(KEYSYSTEM_ELEMENT_ID, KEY_SYSTEMS); 44 Utils.addOptions(KEYSYSTEM_ELEMENT_ID, KEY_SYSTEMS);
36 Utils.addOptions(MEDIA_TYPE_ELEMENT_ID, MEDIA_TYPES); 45 Utils.addOptions(MEDIA_TYPE_ELEMENT_ID, MEDIA_TYPES);
37 Utils.addOptions(USE_PREFIXED_EME_ID, EME_VERSIONS_OPTIONS, 46 Utils.addOptions(USE_PREFIXED_EME_ID, EME_VERSIONS_OPTIONS,
38 EME_DISABLED_OPTIONS); 47 EME_DISABLED_OPTIONS);
39 48
40 document.getElementById(MEDIA_FILE_ELEMENT_ID).value = 49 document.getElementById(MEDIA_FILE_ELEMENT_ID).value =
(...skipping 15 matching lines...) Expand all
56 // Reload test configuration from document. 65 // Reload test configuration from document.
57 this.mediaFile = document.getElementById(MEDIA_FILE_ELEMENT_ID).value; 66 this.mediaFile = document.getElementById(MEDIA_FILE_ELEMENT_ID).value;
58 this.keySystem = document.getElementById(KEYSYSTEM_ELEMENT_ID).value; 67 this.keySystem = document.getElementById(KEYSYSTEM_ELEMENT_ID).value;
59 this.mediaType = document.getElementById(MEDIA_TYPE_ELEMENT_ID).value; 68 this.mediaType = document.getElementById(MEDIA_TYPE_ELEMENT_ID).value;
60 this.useMSE = document.getElementById(USE_MSE_ELEMENT_ID).value == 'true'; 69 this.useMSE = document.getElementById(USE_MSE_ELEMENT_ID).value == 'true';
61 this.usePrefixedEME = document.getElementById(USE_PREFIXED_EME_ID).value == 70 this.usePrefixedEME = document.getElementById(USE_PREFIXED_EME_ID).value ==
62 EME_PREFIXED_VERSION; 71 EME_PREFIXED_VERSION;
63 this.licenseServerURL = 72 this.licenseServerURL =
64 document.getElementById(LICENSE_SERVER_ELEMENT_ID).value; 73 document.getElementById(LICENSE_SERVER_ELEMENT_ID).value;
65 }; 74 };
OLDNEW
« no previous file with comments | « media/test/data/eme_player_js/player_utils.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698