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

Side by Side Diff: third_party/WebKit/LayoutTests/media/encrypted-media/encrypted-media-requestmediakeysystemaccess.html

Issue 1911953003: EME: Correctly handle container-only contentType strings (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 7 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
OLDNEW
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> 10 <div id="log"></div>
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 75
76 // Key system name is case sensitive. 76 // Key system name is case sensitive.
77 expect_error('org.w3.Clearkey', [{}], 'NotSupportedError', 'Key syst em name is case sensitive'); 77 expect_error('org.w3.Clearkey', [{}], 'NotSupportedError', 'Key syst em name is case sensitive');
78 expect_error('Org.w3.clearkey', [{}], 'NotSupportedError', 'Key syst em name is case sensitive'); 78 expect_error('Org.w3.clearkey', [{}], 'NotSupportedError', 'Key syst em name is case sensitive');
79 79
80 // Tests for trivial configurations. 80 // Tests for trivial configurations.
81 expect_error('org.w3.clearkey', [], 'InvalidAccessError', 'Empty sup portedConfigurations'); 81 expect_error('org.w3.clearkey', [], 'InvalidAccessError', 'Empty sup portedConfigurations');
82 expect_config('org.w3.clearkey', [{}], {}, 'Empty configuration'); 82 expect_config('org.w3.clearkey', [{}], {}, 'Empty configuration');
83 83
84 // Various combinations of supportedConfigurations. 84 // Various combinations of supportedConfigurations.
85 // TODO(jrummell): Specifying contentType without codecs is
86 // deprecated, so this test should fail. http://crbug.com/605661.
85 expect_config('org.w3.clearkey', [{ 87 expect_config('org.w3.clearkey', [{
86 initDataTypes: ['webm'], 88 initDataTypes: ['webm'],
87 audioCapabilities: [{contentType: 'audio/webm'}], 89 audioCapabilities: [{contentType: 'audio/webm'}],
88 videoCapabilities: [{contentType: 'video/webm'}], 90 videoCapabilities: [{contentType: 'video/webm'}],
89 }], { 91 }], {
90 initDataTypes: ['webm'], 92 initDataTypes: ['webm'],
91 audioCapabilities: [{contentType: 'audio/webm'}], 93 audioCapabilities: [{contentType: 'audio/webm'}],
92 videoCapabilities: [{contentType: 'video/webm'}], 94 videoCapabilities: [{contentType: 'video/webm'}],
93 }, 'Basic supported configuration'); 95 }, 'Basic supported configuration');
94 96
97 // TODO(jrummell): Specifying contentType without codecs is
98 // deprecated, so this test should fail. http://crbug.com/605661.
95 expect_config('org.w3.clearkey', [{ 99 expect_config('org.w3.clearkey', [{
96 initDataTypes: ['fakeidt', 'webm'], 100 initDataTypes: ['fakeidt', 'webm'],
97 audioCapabilities: [{contentType: 'audio/fake'}, {contentType: ' audio/webm'}], 101 audioCapabilities: [{contentType: 'audio/fake'}, {contentType: ' audio/webm'}],
98 videoCapabilities: [{contentType: 'video/fake'}, {contentType: ' video/webm'}], 102 videoCapabilities: [{contentType: 'video/fake'}, {contentType: ' video/webm'}],
99 }], { 103 }], {
100 initDataTypes: ['webm'], 104 initDataTypes: ['webm'],
101 audioCapabilities: [{contentType: 'audio/webm'}], 105 audioCapabilities: [{contentType: 'audio/webm'}],
102 videoCapabilities: [{contentType: 'video/webm'}], 106 videoCapabilities: [{contentType: 'video/webm'}],
103 }, 'Partially supported configuration'); 107 }, 'Partially supported configuration');
104 108
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after
247 videoCapabilities: [{contentType: 'video/Webm; codecs="vp8"'}], 251 videoCapabilities: [{contentType: 'video/Webm; codecs="vp8"'}],
248 }, 'video/Webm'); 252 }, 'video/Webm');
249 253
250 expect_config('org.w3.clearkey', [{ 254 expect_config('org.w3.clearkey', [{
251 videoCapabilities: [{contentType: 'video/webm; Codecs="vp8"'}], 255 videoCapabilities: [{contentType: 'video/webm; Codecs="vp8"'}],
252 }], { 256 }], {
253 videoCapabilities: [{contentType: 'video/webm; Codecs="vp8"'}], 257 videoCapabilities: [{contentType: 'video/webm; Codecs="vp8"'}],
254 }, 'Codecs='); 258 }, 'Codecs=');
255 259
256 expect_config('org.w3.clearkey', [{ 260 expect_config('org.w3.clearkey', [{
257 videoCapabilities: [{contentType: 'VIDEO/WEBM; CODECS="vp8"'}], 261 videoCapabilities: [{contentType: 'VIDEO/WEBM; codecs="vp8"'}],
258 }], { 262 }], {
259 videoCapabilities: [{contentType: 'VIDEO/WEBM; CODECS="vp8"'}], 263 videoCapabilities: [{contentType: 'VIDEO/WEBM; codecs="vp8"'}],
260 }, 'VIDEO/WEBM'); 264 }, 'VIDEO/WEBM');
261 265
266 expect_config('org.w3.clearkey', [{
267 videoCapabilities: [{contentType: 'video/webm; CODECS="vp8"'}],
268 }], {
269 videoCapabilities: [{contentType: 'video/webm; CODECS="vp8"'}],
270 }, 'CODECS=');
271
262 // Unrecognized attributes are not allowed. 272 // Unrecognized attributes are not allowed.
263 // TODO(jrummell): Unrecognized attributes are ignored currently. 273 // TODO(jrummell): Unrecognized attributes are ignored currently.
264 // http://crbug.com/449690 274 // http://crbug.com/449690
265 // expect_error('org.w3.clearkey', [{ 275 // expect_error('org.w3.clearkey', [{
266 // videoCapabilities: [{contentType: 'video/webm; foo="bar"'}], 276 // videoCapabilities: [{contentType: 'video/webm; foo="bar"'}],
267 // }], 'NotSupportedError', 'Unrecognized foo'); 277 // }], 'NotSupportedError', 'Unrecognized foo');
268 // expect_error('org.w3.clearkey', [{ 278 // expect_error('org.w3.clearkey', [{
269 // videoCapabilities: [{contentType: 'video/webm; foo="bar"; codecs ="vp8"'}], 279 // videoCapabilities: [{contentType: 'video/webm; foo="bar"; codecs ="vp8"'}],
270 // }], 'NotSupportedError', 'Unrecognized foo with codecs'); 280 // }], 'NotSupportedError', 'Unrecognized foo with codecs');
271 281
(...skipping 27 matching lines...) Expand all
299 expect_error('org.w3.clearkey', [{ 309 expect_error('org.w3.clearkey', [{
300 videoCapabilities: [{contentType: 'video/webm; codecs="vp8,"'}], 310 videoCapabilities: [{contentType: 'video/webm; codecs="vp8,"'}],
301 }], 'NotSupportedError', 'Trailing , in codecs'); 311 }], 'NotSupportedError', 'Trailing , in codecs');
302 312
303 expect_error('org.w3.clearkey', [{ 313 expect_error('org.w3.clearkey', [{
304 videoCapabilities: [{contentType: 'video/webm; codecs=",vp8,"'}] , 314 videoCapabilities: [{contentType: 'video/webm; codecs=",vp8,"'}] ,
305 }], 'NotSupportedError', 'Leading and trailing , in codecs'); 315 }], 'NotSupportedError', 'Leading and trailing , in codecs');
306 </script> 316 </script>
307 </body> 317 </body>
308 </html> 318 </html>
OLDNEW
« no previous file with comments | « media/blink/key_system_config_selector.cc ('k') | third_party/WebKit/Source/core/frame/Deprecation.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698