| OLD | NEW |
| 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; |
| 11 this.licenseServerURL = null; | 11 this.licenseServerURL = null; |
| 12 this.useMSE = false; | 12 this.useMSE = false; |
| 13 this.runFPS = false; | 13 this.runFPS = false; |
| 14 this.playTwice = false; | 14 this.playTwice = false; |
| 15 this.configChangeType = CONFIG_CHANGE_TYPE.CLEAR_TO_CLEAR; |
| 15 } | 16 } |
| 16 | 17 |
| 17 TestConfig.prototype.loadQueryParams = function() { | 18 TestConfig.prototype.loadQueryParams = function() { |
| 18 // Load query parameters and set default values. | 19 // Load query parameters and set default values. |
| 19 var r = /([^&=]+)=?([^&]*)/g; | 20 var r = /([^&=]+)=?([^&]*)/g; |
| 20 // Lambda function for decoding extracted match values. Replaces '+' with | 21 // Lambda function for decoding extracted match values. Replaces '+' with |
| 21 // space so decodeURIComponent functions properly. | 22 // space so decodeURIComponent functions properly. |
| 22 var decodeURI = function decodeURI(s) { | 23 var decodeURI = function decodeURI(s) { |
| 23 return decodeURIComponent(s.replace(/\+/g, ' ')); | 24 return decodeURIComponent(s.replace(/\+/g, ' ')); |
| 24 }; | 25 }; |
| (...skipping 27 matching lines...) Expand all Loading... |
| 52 // Reload test configuration from document. | 53 // Reload test configuration from document. |
| 53 this.mediaFile = document.getElementById(MEDIA_FILE_ELEMENT_ID).value; | 54 this.mediaFile = document.getElementById(MEDIA_FILE_ELEMENT_ID).value; |
| 54 this.keySystem = document.getElementById(KEYSYSTEM_ELEMENT_ID).value; | 55 this.keySystem = document.getElementById(KEYSYSTEM_ELEMENT_ID).value; |
| 55 this.mediaType = document.getElementById(MEDIA_TYPE_ELEMENT_ID).value; | 56 this.mediaType = document.getElementById(MEDIA_TYPE_ELEMENT_ID).value; |
| 56 this.useMSE = document.getElementById(USE_MSE_ELEMENT_ID).value == 'true'; | 57 this.useMSE = document.getElementById(USE_MSE_ELEMENT_ID).value == 'true'; |
| 57 this.playTwice = | 58 this.playTwice = |
| 58 document.getElementById(USE_PLAY_TWICE_ELEMENT_ID).value == 'true'; | 59 document.getElementById(USE_PLAY_TWICE_ELEMENT_ID).value == 'true'; |
| 59 this.licenseServerURL = | 60 this.licenseServerURL = |
| 60 document.getElementById(LICENSE_SERVER_ELEMENT_ID).value; | 61 document.getElementById(LICENSE_SERVER_ELEMENT_ID).value; |
| 61 }; | 62 }; |
| OLD | NEW |