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

Side by Side Diff: third_party/WebKit/LayoutTests/imported/wpt/encrypted-media/scripts/check-initdata-type.js

Issue 2546853003: Add W3C encrypted-media tests (Closed)
Patch Set: rebase now that content files landed Created 4 years 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
(Empty)
1 function runTest( config, qualifier )
2 {
3 function checkInitDataType(initDataType)
4 {
5 return isInitDataTypeSupported(initDataType).then(function(result) {
6 // If |initDataType| is not supported, simply succeed.
7 if (!result)
8 return Promise.resolve('Not supported');
9
10 return navigator.requestMediaKeySystemAccess( config.keysystem, getS impleConfigurationForInitDataType(initDataType))
11 .then(function(access) {
12 return access.createMediaKeys();
13 }).then(function(mediaKeys) {
14 var mediaKeySession = mediaKeys.createSession();
15 var initData = getInitData(initDataType);
16 return mediaKeySession.generateRequest(initDataType, initDat a);
17 });
18 });
19 }
20
21 promise_test(function()
22 {
23 return checkInitDataType('webm');
24 }, testnamePrefix( qualifier, config.keysystem ) + ' support for "webm".');
25
26 promise_test(function()
27 {
28 return checkInitDataType('cenc');
29 }, testnamePrefix( qualifier, config.keysystem ) + ' support for "cenc".');
30
31 promise_test(function()
32 {
33 return checkInitDataType('keyids');
34 }, testnamePrefix( qualifier, config.keysystem ) + ' support for "keyids".') ;
35 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698