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

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: Created 4 years, 6 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 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 getSupportedInitDataType().then(function(type) {
64 initDataType = type; 64 initDataType = type;
65 initData = getInitData(initDataType); 65 initData = getInitData(initDataType);
66 return navigator.requestMediaKeySystemAccess('org.w3.clearke y', [{}]); 66 return requestClearKeySystemAccessForInitType(initDataType);
67 }).then(function(access) { 67 }).then(function(access) {
68 return access.createMediaKeys(); 68 return access.createMediaKeys();
69 }).then(function(mediaKeys) { 69 }).then(function(mediaKeys) {
70 mediaKeySession = mediaKeys.createSession(); 70 mediaKeySession = mediaKeys.createSession();
71 71
72 // There should be no keys defined yet. 72 // There should be no keys defined yet.
73 assert_equals(mediaKeySession.keyStatuses.size, 0); 73 assert_equals(mediaKeySession.keyStatuses.size, 0);
74 74
75 waitForEventAndRunStep('message', mediaKeySession, processMe ssage, test); 75 waitForEventAndRunStep('message', mediaKeySession, processMe ssage, test);
76 waitForEventAndRunStep('keystatuseschange', mediaKeySession, processKeyStatusesChange, test); 76 waitForEventAndRunStep('keystatuseschange', mediaKeySession, processKeyStatusesChange, test);
77 77
78 return mediaKeySession.generateRequest(initDataType, initDat a); 78 return mediaKeySession.generateRequest(initDataType, initDat a);
79 }).catch(function(error) { 79 }).catch(function(error) {
80 forceTestFailureFromPromise(test, error); 80 forceTestFailureFromPromise(test, error);
81 }); 81 });
82 }, 'Verify MediaKeySession.keyStatuses with multiple updates.'); 82 }, 'Verify MediaKeySession.keyStatuses with multiple updates.');
83 </script> 83 </script>
84 </body> 84 </body>
85 </html> 85 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698