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

Side by Side Diff: third_party/WebKit/LayoutTests/media/encrypted-media/encrypted-media-keystatuses-multiple-sessions.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 sessions</title> 4 <title>Verify MediaKeySession.keyStatuses with multiple sessions</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 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 84
85 // session1 should still have 1 key. 85 // session1 should still have 1 key.
86 verifyKeyStatuses(mediaKeySession1.keyStatuses, { expected: [key1], unexpected: [key2] }); 86 verifyKeyStatuses(mediaKeySession1.keyStatuses, { expected: [key1], unexpected: [key2] });
87 87
88 test.done(); 88 test.done();
89 } 89 }
90 90
91 getSupportedInitDataType().then(function(type) { 91 getSupportedInitDataType().then(function(type) {
92 initDataType = type; 92 initDataType = type;
93 initData = getInitData(initDataType); 93 initData = getInitData(initDataType);
94 return navigator.requestMediaKeySystemAccess('org.w3.clearke y', [{}]); 94 return requestClearKeySystemAccessForInitType(initDataType);
95 }).then(function(access) { 95 }).then(function(access) {
96 return access.createMediaKeys(); 96 return access.createMediaKeys();
97 }).then(function(mediaKeys) { 97 }).then(function(mediaKeys) {
98 mediaKeySession1 = mediaKeys.createSession(); 98 mediaKeySession1 = mediaKeys.createSession();
99 mediaKeySession2 = mediaKeys.createSession(); 99 mediaKeySession2 = mediaKeys.createSession();
100 100
101 // There should be no keys defined on either session. 101 // There should be no keys defined on either session.
102 verifyKeyStatuses(mediaKeySession1.keyStatuses, { expected: [], unexpected: [key1, key2] }); 102 verifyKeyStatuses(mediaKeySession1.keyStatuses, { expected: [], unexpected: [key1, key2] });
103 verifyKeyStatuses(mediaKeySession2.keyStatuses, { expected: [], unexpected: [key1, key2] }); 103 verifyKeyStatuses(mediaKeySession2.keyStatuses, { expected: [], unexpected: [key1, key2] });
104 104
105 // Bind all the event handlers now. 105 // Bind all the event handlers now.
106 waitForEventAndRunStep('message', mediaKeySession1, processM essage1, test); 106 waitForEventAndRunStep('message', mediaKeySession1, processM essage1, test);
107 waitForEventAndRunStep('message', mediaKeySession2, processM essage2, test); 107 waitForEventAndRunStep('message', mediaKeySession2, processM essage2, test);
108 waitForEventAndRunStep('keystatuseschange', mediaKeySession1 , processKeyStatusesChange1, test); 108 waitForEventAndRunStep('keystatuseschange', mediaKeySession1 , processKeyStatusesChange1, test);
109 waitForEventAndRunStep('keystatuseschange', mediaKeySession2 , processKeyStatusesChange2, test); 109 waitForEventAndRunStep('keystatuseschange', mediaKeySession2 , processKeyStatusesChange2, test);
110 110
111 // Generate a request on session1. 111 // Generate a request on session1.
112 return mediaKeySession1.generateRequest(initDataType, initDa ta); 112 return mediaKeySession1.generateRequest(initDataType, initDa ta);
113 }).catch(function(error) { 113 }).catch(function(error) {
114 forceTestFailureFromPromise(test, error); 114 forceTestFailureFromPromise(test, error);
115 }); 115 });
116 }, 'Verify MediaKeySession.keyStatuses with multiple sessions.'); 116 }, 'Verify MediaKeySession.keyStatuses with multiple sessions.');
117 </script> 117 </script>
118 </body> 118 </body>
119 </html> 119 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698