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

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: 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
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 226 matching lines...) Expand 10 before | Expand all | Expand 10 after
237 }], { 237 }], {
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).
xhwang 2017/02/08 06:15:23 I found this in the RFC to be very clear. Maybe we
jrummell 2017/02/08 21:10:14 Done.
248 expect_config('org.w3.clearkey', [{ 248 expect_config('org.w3.clearkey', [{
249 videoCapabilities: [{contentType: 'Video/webm; codecs="vp8"'}], 249 videoCapabilities: [{contentType: 'Video/webm; codecs="vp8"'}],
250 }], { 250 }], {
251 videoCapabilities: [{contentType: 'Video/webm; codecs="vp8"'}], 251 videoCapabilities: [{contentType: 'Video/webm; codecs="vp8"'}],
252 }, 'Video/webm'); 252 }, 'Video/webm');
xhwang 2017/02/08 06:15:23 Maybe update the description to something like "Me
jrummell 2017/02/08 21:10:14 Done.
253 253
254 expect_config('org.w3.clearkey', [{ 254 expect_config('org.w3.clearkey', [{
255 videoCapabilities: [{contentType: 'video/Webm; codecs="vp8"'}], 255 videoCapabilities: [{contentType: 'video/Webm; codecs="vp8"'}],
256 }], { 256 }], {
257 videoCapabilities: [{contentType: 'video/Webm; codecs="vp8"'}], 257 videoCapabilities: [{contentType: 'video/Webm; codecs="vp8"'}],
258 }, 'video/Webm'); 258 }, 'video/Webm');
xhwang 2017/02/08 06:15:23 "Media subtype value is case-insensitive"
jrummell 2017/02/08 21:10:14 Done.
259 259
260 expect_config('org.w3.clearkey', [{ 260 expect_config('org.w3.clearkey', [{
261 videoCapabilities: [{contentType: 'video/webm; Codecs="vp8"'}], 261 videoCapabilities: [{contentType: 'video/webm; Codecs="vp8"'}],
262 }], { 262 }], {
263 videoCapabilities: [{contentType: 'video/webm; Codecs="vp8"'}], 263 videoCapabilities: [{contentType: 'video/webm; Codecs="vp8"'}],
264 }, 'Codecs='); 264 }, 'Codecs=');
xhwang 2017/02/08 06:15:24 "Media parameter name is case-insensitive"
jrummell 2017/02/08 21:10:14 Removed since it's a duplicate of the test below (
265 265
266 expect_config('org.w3.clearkey', [{ 266 expect_config('org.w3.clearkey', [{
267 videoCapabilities: [{contentType: 'VIDEO/WEBM; codecs="vp8"'}], 267 videoCapabilities: [{contentType: 'VIDEO/WEBM; codecs="vp8"'}],
268 }], { 268 }], {
269 videoCapabilities: [{contentType: 'VIDEO/WEBM; codecs="vp8"'}], 269 videoCapabilities: [{contentType: 'VIDEO/WEBM; codecs="vp8"'}],
270 }, 'VIDEO/WEBM'); 270 }, 'VIDEO/WEBM');
xhwang 2017/02/08 06:15:23 media type values and subtype values are case-inse
jrummell 2017/02/08 21:10:14 Done.
271 271
272 expect_config('org.w3.clearkey', [{ 272 expect_config('org.w3.clearkey', [{
273 videoCapabilities: [{contentType: 'video/webm; CODECS="vp8"'}], 273 videoCapabilities: [{contentType: 'video/webm; CODECS="vp8"'}],
274 }], { 274 }], {
275 videoCapabilities: [{contentType: 'video/webm; CODECS="vp8"'}], 275 videoCapabilities: [{contentType: 'video/webm; CODECS="vp8"'}],
276 }, 'CODECS='); 276 }, 'CODECS=');
xhwang 2017/02/08 06:15:23 "Media parameter name is case-insensitive"
jrummell 2017/02/08 21:10:14 Done.
277 277
278 expect_error('org.w3.clearkey', [{
279 videoCapabilities: [{contentType: 'video/webm; CODECS="foo"'}],
280 }], 'NotSupportedError', 'CODECS=foo');
xhwang 2017/02/08 06:15:23 Unsupported codec
jrummell 2017/02/08 21:10:14 Done.
281
278 // Unrecognized attributes are not allowed. 282 // Unrecognized attributes are not allowed.
279 // TODO(jrummell): Unrecognized attributes are ignored currently. 283 // TODO(jrummell): Unrecognized attributes are ignored currently.
280 // http://crbug.com/449690 284 // http://crbug.com/449690
281 // expect_error('org.w3.clearkey', [{ 285 // expect_error('org.w3.clearkey', [{
282 // videoCapabilities: [{contentType: 'video/webm; foo="bar"'}], 286 // videoCapabilities: [{contentType: 'video/webm; foo="bar"'}],
283 // }], 'NotSupportedError', 'Unrecognized foo'); 287 // }], 'NotSupportedError', 'Unrecognized foo');
284 // expect_error('org.w3.clearkey', [{ 288 // expect_error('org.w3.clearkey', [{
285 // videoCapabilities: [{contentType: 'video/webm; foo="bar"; codecs ="vp8"'}], 289 // videoCapabilities: [{contentType: 'video/webm; foo="bar"; codecs ="vp8"'}],
286 // }], 'NotSupportedError', 'Unrecognized foo with codecs'); 290 // }], 'NotSupportedError', 'Unrecognized foo with codecs');
287 291
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
336 }], 'NotSupportedError', 'persistent-license sessionType'); 340 }], 'NotSupportedError', 'persistent-license sessionType');
337 341
338 // Verify invalid sessionTypes. 342 // Verify invalid sessionTypes.
339 expect_error('org.w3.clearkey', [{ 343 expect_error('org.w3.clearkey', [{
340 sessionTypes: [ 'foo' ], 344 sessionTypes: [ 'foo' ],
341 audioCapabilities: [{contentType: 'audio/webm; codecs=vorbis'}] 345 audioCapabilities: [{contentType: 'audio/webm; codecs=vorbis'}]
342 }], 'NotSupportedError', 'invalid sessionType'); 346 }], 'NotSupportedError', 'invalid sessionType');
343 </script> 347 </script>
344 </body> 348 </body>
345 </html> 349 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698