OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <html> | 2 <html> |
3 <head> | 3 <head> |
4 <title>Test support of different initDataTypes.</title> | 4 <title>Test support of different initDataTypes.</title> |
5 <script src="encrypted-media-utils.js"></script> | 5 <script src="encrypted-media-utils.js"></script> |
6 <script src="../../resources/testharness.js"></script> | 6 <script src="../../resources/testharness.js"></script> |
7 <script src="../../resources/testharnessreport.js"></script> | 7 <script src="../../resources/testharnessreport.js"></script> |
8 </head> | 8 </head> |
9 <body> | 9 <body> |
10 <div id="log"></div> | |
11 <script> | 10 <script> |
12 function checkInitDataType(initDataType) | 11 function checkInitDataType(initDataType) |
13 { | 12 { |
14 return isInitDataTypeSupported(initDataType).then(function(resul
t) { | 13 return isInitDataTypeSupported(initDataType).then(function(resul
t) { |
15 // If |initDataType| is not supported, simply succeed. | 14 // If |initDataType| is not supported, simply succeed. |
16 if (!result) | 15 if (!result) |
17 return Promise.resolve('Not supported'); | 16 return Promise.resolve('Not supported'); |
18 | 17 |
19 return navigator.requestMediaKeySystemAccess('org.w3.clearke
y', getSimpleConfigurationForInitDataType(initDataType)) | 18 return navigator.requestMediaKeySystemAccess('org.w3.clearke
y', getSimpleConfigurationForInitDataType(initDataType)) |
20 .then(function(access) { | 19 .then(function(access) { |
(...skipping 17 matching lines...) Expand all Loading... |
38 }, 'Clear key support for "cenc".'); | 37 }, 'Clear key support for "cenc".'); |
39 | 38 |
40 promise_test(function() | 39 promise_test(function() |
41 { | 40 { |
42 return checkInitDataType('keyids'); | 41 return checkInitDataType('keyids'); |
43 }, 'Clear key support for "keyids".'); | 42 }, 'Clear key support for "keyids".'); |
44 </script> | 43 </script> |
45 </body> | 44 </body> |
46 </html> | 45 </html> |
47 | 46 |
OLD | NEW |