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 <script> | 10 <script> |
(...skipping 296 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
307 }], 'NotSupportedError', 'Codec is case-sensitive'); | 307 }], 'NotSupportedError', 'Codec is case-sensitive'); |
308 | 308 |
309 // Unrecognized attributes are not allowed. | 309 // Unrecognized attributes are not allowed. |
310 expect_error('org.w3.clearkey', [{ | 310 expect_error('org.w3.clearkey', [{ |
311 videoCapabilities: [{contentType: 'video/webm; foo="bar"'}], | 311 videoCapabilities: [{contentType: 'video/webm; foo="bar"'}], |
312 }], 'NotSupportedError', 'Unrecognized foo'); | 312 }], 'NotSupportedError', 'Unrecognized foo'); |
313 expect_error('org.w3.clearkey', [{ | 313 expect_error('org.w3.clearkey', [{ |
314 videoCapabilities: [{contentType: 'video/webm; foo="bar"; codecs
="vp8"'}], | 314 videoCapabilities: [{contentType: 'video/webm; foo="bar"; codecs
="vp8"'}], |
315 }], 'NotSupportedError', 'Unrecognized foo with codecs'); | 315 }], 'NotSupportedError', 'Unrecognized foo with codecs'); |
316 | 316 |
| 317 // Multiple parameters with the same name are not allowed (RFC6838). |
| 318 expect_error('org.w3.clearkey', [{ |
| 319 videoCapabilities: [{contentType: 'video/webm; codecs=vp8; codec
s=vp9'}], |
| 320 }], 'NotSupportedError', 'Multiple codecs'); |
| 321 |
317 // Invalid contentTypes. | 322 // Invalid contentTypes. |
318 expect_error('org.w3.clearkey', [{ | 323 expect_error('org.w3.clearkey', [{ |
319 videoCapabilities: [{contentType: 'fake'}], | 324 videoCapabilities: [{contentType: 'fake'}], |
320 }], 'NotSupportedError', 'contentType fake'); | 325 }], 'NotSupportedError', 'contentType fake'); |
321 | 326 |
322 expect_error('org.w3.clearkey', [{ | 327 expect_error('org.w3.clearkey', [{ |
323 audioCapabilities: [{contentType: 'audio/fake'}], | 328 audioCapabilities: [{contentType: 'audio/fake'}], |
324 }], 'NotSupportedError', 'contentType audio/fake'); | 329 }], 'NotSupportedError', 'contentType audio/fake'); |
325 | 330 |
326 expect_error('org.w3.clearkey', [{ | 331 expect_error('org.w3.clearkey', [{ |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
365 }], 'NotSupportedError', 'persistent-license sessionType'); | 370 }], 'NotSupportedError', 'persistent-license sessionType'); |
366 | 371 |
367 // Verify invalid sessionTypes. | 372 // Verify invalid sessionTypes. |
368 expect_error('org.w3.clearkey', [{ | 373 expect_error('org.w3.clearkey', [{ |
369 sessionTypes: [ 'foo' ], | 374 sessionTypes: [ 'foo' ], |
370 audioCapabilities: [{contentType: 'audio/webm; codecs=vorbis'}] | 375 audioCapabilities: [{contentType: 'audio/webm; codecs=vorbis'}] |
371 }], 'NotSupportedError', 'invalid sessionType'); | 376 }], 'NotSupportedError', 'invalid sessionType'); |
372 </script> | 377 </script> |
373 </body> | 378 </body> |
374 </html> | 379 </html> |
OLD | NEW |