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

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

Issue 2681993002: EME: Allow case-insensitive parameter names in media MIME types (Closed)
Patch Set: rebase Created 3 years, 10 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/modules/encryptedmedia/NavigatorRequestMediaKeySystemAccess.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 <script> 10 <script>
(...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after
238 videoCapabilities: [{contentType: 'video/webm; codecs=" vp8"'}], 238 videoCapabilities: [{contentType: 'video/webm; codecs=" vp8"'}],
239 }, 'Space at start of codecs parameter'); 239 }, 'Space at start of codecs parameter');
240 240
241 expect_config('org.w3.clearkey', [{ 241 expect_config('org.w3.clearkey', [{
242 videoCapabilities: [{contentType: 'video/webm; codecs="vp8 "'}], 242 videoCapabilities: [{contentType: 'video/webm; codecs="vp8 "'}],
243 }], { 243 }], {
244 videoCapabilities: [{contentType: 'video/webm; codecs="vp8 "'}], 244 videoCapabilities: [{contentType: 'video/webm; codecs="vp8 "'}],
245 }, 'Space at end of codecs parameter'); 245 }, 'Space at end of codecs parameter');
246 246
247 // contentType is not case sensitive (except the codec names). 247 // contentType is not case sensitive (except the codec names).
248 // From RFC 2045: "All media type values, subtype values, and
249 // parameter names as defined are case-insensitive. However,
250 // parameter values are case-sensitive unless otherwise specified
251 // for the specific parameter."
248 expect_config('org.w3.clearkey', [{ 252 expect_config('org.w3.clearkey', [{
249 videoCapabilities: [{contentType: 'Video/webm; codecs="vp8"'}], 253 videoCapabilities: [{contentType: 'Video/webm; codecs="vp8"'}],
250 }], { 254 }], {
251 videoCapabilities: [{contentType: 'Video/webm; codecs="vp8"'}], 255 videoCapabilities: [{contentType: 'Video/webm; codecs="vp8"'}],
252 }, 'Video/webm'); 256 }, 'Media type value is case-insensitive');
253 257
254 expect_config('org.w3.clearkey', [{ 258 expect_config('org.w3.clearkey', [{
255 videoCapabilities: [{contentType: 'video/Webm; codecs="vp8"'}], 259 videoCapabilities: [{contentType: 'video/Webm; codecs="vp8"'}],
256 }], { 260 }], {
257 videoCapabilities: [{contentType: 'video/Webm; codecs="vp8"'}], 261 videoCapabilities: [{contentType: 'video/Webm; codecs="vp8"'}],
258 }, 'video/Webm'); 262 }, 'Media subtype value is case-insensitive');
259
260 expect_config('org.w3.clearkey', [{
261 videoCapabilities: [{contentType: 'video/webm; Codecs="vp8"'}],
262 }], {
263 videoCapabilities: [{contentType: 'video/webm; Codecs="vp8"'}],
264 }, 'Codecs=');
265 263
266 expect_config('org.w3.clearkey', [{ 264 expect_config('org.w3.clearkey', [{
267 videoCapabilities: [{contentType: 'VIDEO/WEBM; codecs="vp8"'}], 265 videoCapabilities: [{contentType: 'VIDEO/WEBM; codecs="vp8"'}],
268 }], { 266 }], {
269 videoCapabilities: [{contentType: 'VIDEO/WEBM; codecs="vp8"'}], 267 videoCapabilities: [{contentType: 'VIDEO/WEBM; codecs="vp8"'}],
270 }, 'VIDEO/WEBM'); 268 }, 'Media type values and subtype values are case-insensitive');
271 269
272 expect_config('org.w3.clearkey', [{ 270 expect_config('org.w3.clearkey', [{
273 videoCapabilities: [{contentType: 'video/webm; CODECS="vp8"'}], 271 videoCapabilities: [{contentType: 'video/webm; CODECS="vp8"'}],
274 }], { 272 }], {
275 videoCapabilities: [{contentType: 'video/webm; CODECS="vp8"'}], 273 videoCapabilities: [{contentType: 'video/webm; CODECS="vp8"'}],
276 }, 'CODECS='); 274 }, 'Media parameter name is case-insensitive');
275
276 expect_error('org.w3.clearkey', [{
277 videoCapabilities: [{contentType: 'video/webm; CODECS="foo"'}],
278 }], 'NotSupportedError', 'Unsupported codec');
279
280 expect_error('org.w3.clearkey', [{
281 videoCapabilities: [{contentType: 'video/webm; codecs="VP8"'}],
282 }], 'NotSupportedError', 'Codec is case-sensitive');
277 283
278 // Unrecognized attributes are not allowed. 284 // Unrecognized attributes are not allowed.
279 // TODO(jrummell): Unrecognized attributes are ignored currently. 285 // TODO(jrummell): Unrecognized attributes are ignored currently.
280 // http://crbug.com/449690 286 // http://crbug.com/690131
281 // expect_error('org.w3.clearkey', [{ 287 // expect_error('org.w3.clearkey', [{
282 // videoCapabilities: [{contentType: 'video/webm; foo="bar"'}], 288 // videoCapabilities: [{contentType: 'video/webm; foo="bar"'}],
283 // }], 'NotSupportedError', 'Unrecognized foo'); 289 // }], 'NotSupportedError', 'Unrecognized foo');
284 // expect_error('org.w3.clearkey', [{ 290 // expect_error('org.w3.clearkey', [{
285 // videoCapabilities: [{contentType: 'video/webm; foo="bar"; codecs ="vp8"'}], 291 // videoCapabilities: [{contentType: 'video/webm; foo="bar"; codecs ="vp8"'}],
286 // }], 'NotSupportedError', 'Unrecognized foo with codecs'); 292 // }], 'NotSupportedError', 'Unrecognized foo with codecs');
287 293
288 // Invalid contentTypes. 294 // Invalid contentTypes.
289 expect_error('org.w3.clearkey', [{ 295 expect_error('org.w3.clearkey', [{
290 videoCapabilities: [{contentType: 'fake'}], 296 videoCapabilities: [{contentType: 'fake'}],
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
336 }], 'NotSupportedError', 'persistent-license sessionType'); 342 }], 'NotSupportedError', 'persistent-license sessionType');
337 343
338 // Verify invalid sessionTypes. 344 // Verify invalid sessionTypes.
339 expect_error('org.w3.clearkey', [{ 345 expect_error('org.w3.clearkey', [{
340 sessionTypes: [ 'foo' ], 346 sessionTypes: [ 'foo' ],
341 audioCapabilities: [{contentType: 'audio/webm; codecs=vorbis'}] 347 audioCapabilities: [{contentType: 'audio/webm; codecs=vorbis'}]
342 }], 'NotSupportedError', 'invalid sessionType'); 348 }], 'NotSupportedError', 'invalid sessionType');
343 </script> 349 </script>
344 </body> 350 </body>
345 </html> 351 </html>
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/modules/encryptedmedia/NavigatorRequestMediaKeySystemAccess.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698