| OLD | NEW |
| 1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
| 2 <html> | 2 <html> |
| 3 <head> | 3 <head> |
| 4 <title>Test navigator.requestMediaKeySystemAccess()</title> | 4 <title>Test navigator.requestMediaKeySystemAccess()</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 expect_error(keySystem, configurations, expectedError, test
Name) { | 11 function expect_error(keySystem, configurations, expectedError, test
Name) { |
| 13 promise_test(function(test) { | 12 promise_test(function(test) { |
| 14 return navigator.requestMediaKeySystemAccess(keySystem, conf
igurations).then(function(a) { | 13 return navigator.requestMediaKeySystemAccess(keySystem, conf
igurations).then(function(a) { |
| 15 assert_unreached('Unexpected requestMediaKeySystemAccess
() success.'); | 14 assert_unreached('Unexpected requestMediaKeySystemAccess
() success.'); |
| 16 }, function(e) { | 15 }, function(e) { |
| 17 assert_equals(e.name, expectedError); | 16 assert_equals(e.name, expectedError); |
| 18 }); | 17 }); |
| 19 }, testName); | 18 }, testName); |
| 20 } | 19 } |
| (...skipping 288 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 309 expect_error('org.w3.clearkey', [{ | 308 expect_error('org.w3.clearkey', [{ |
| 310 videoCapabilities: [{contentType: 'video/webm; codecs="vp8,"'}], | 309 videoCapabilities: [{contentType: 'video/webm; codecs="vp8,"'}], |
| 311 }], 'NotSupportedError', 'Trailing , in codecs'); | 310 }], 'NotSupportedError', 'Trailing , in codecs'); |
| 312 | 311 |
| 313 expect_error('org.w3.clearkey', [{ | 312 expect_error('org.w3.clearkey', [{ |
| 314 videoCapabilities: [{contentType: 'video/webm; codecs=",vp8,"'}]
, | 313 videoCapabilities: [{contentType: 'video/webm; codecs=",vp8,"'}]
, |
| 315 }], 'NotSupportedError', 'Leading and trailing , in codecs'); | 314 }], 'NotSupportedError', 'Leading and trailing , in codecs'); |
| 316 </script> | 315 </script> |
| 317 </body> | 316 </body> |
| 318 </html> | 317 </html> |
| OLD | NEW |