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

Side by Side Diff: third_party/WebKit/LayoutTests/media/encrypted-media/encrypted-media-keystatuses-multiple-updates.html

Issue 2084053002: EME: Update tests so 'audioCapabilities' always provided (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: changes (+rebase) Created 4 years, 5 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>Verify MediaKeySession.keyStatuses with multiple updates</title> 4 <title>Verify MediaKeySession.keyStatuses with multiple updates</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 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 }); 53 });
54 } else { 54 } else {
55 // Verify that the session now contains key1 and key2. 55 // Verify that the session now contains key1 and key2.
56 dumpKeyStatuses(mediaKeySession.keyStatuses); 56 dumpKeyStatuses(mediaKeySession.keyStatuses);
57 verifyKeyStatuses(mediaKeySession.keyStatuses, { expecte d: [key1, key2] }); 57 verifyKeyStatuses(mediaKeySession.keyStatuses, { expecte d: [key1, key2] });
58 58
59 test.done(); 59 test.done();
60 } 60 }
61 } 61 }
62 62
63 getSupportedInitDataType().then(function(type) { 63 navigator.requestMediaKeySystemAccess('org.w3.clearkey', getSimp leConfiguration()).then(function(access) {
64 initDataType = type; 64 initDataType = access.getConfiguration().initDataTypes[0];
65 initData = getInitData(initDataType); 65 initData = getInitData(initDataType);
66 return navigator.requestMediaKeySystemAccess('org.w3.clearke y', [{}]);
67 }).then(function(access) {
68 return access.createMediaKeys(); 66 return access.createMediaKeys();
69 }).then(function(mediaKeys) { 67 }).then(function(mediaKeys) {
70 mediaKeySession = mediaKeys.createSession(); 68 mediaKeySession = mediaKeys.createSession();
71 69
72 // There should be no keys defined yet. 70 // There should be no keys defined yet.
73 assert_equals(mediaKeySession.keyStatuses.size, 0); 71 assert_equals(mediaKeySession.keyStatuses.size, 0);
74 72
75 waitForEventAndRunStep('message', mediaKeySession, processMe ssage, test); 73 waitForEventAndRunStep('message', mediaKeySession, processMe ssage, test);
76 waitForEventAndRunStep('keystatuseschange', mediaKeySession, processKeyStatusesChange, test); 74 waitForEventAndRunStep('keystatuseschange', mediaKeySession, processKeyStatusesChange, test);
77 75
78 return mediaKeySession.generateRequest(initDataType, initDat a); 76 return mediaKeySession.generateRequest(initDataType, initDat a);
79 }).catch(function(error) { 77 }).catch(function(error) {
80 forceTestFailureFromPromise(test, error); 78 forceTestFailureFromPromise(test, error);
81 }); 79 });
82 }, 'Verify MediaKeySession.keyStatuses with multiple updates.'); 80 }, 'Verify MediaKeySession.keyStatuses with multiple updates.');
83 </script> 81 </script>
84 </body> 82 </body>
85 </html> 83 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698