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

Unified Diff: third_party/WebKit/LayoutTests/media/encrypted-media/encrypted-media-keystatuses-multiple-keys.html

Issue 2847803005: Cleanup verifyKeyStatuses() to take KeyId/status pairs (Closed)
Patch Set: Created 3 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/media/encrypted-media/encrypted-media-keystatuses-multiple-sessions.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/media/encrypted-media/encrypted-media-keystatuses-multiple-keys.html
diff --git a/third_party/WebKit/LayoutTests/media/encrypted-media/encrypted-media-keystatuses-multiple-keys.html b/third_party/WebKit/LayoutTests/media/encrypted-media/encrypted-media-keystatuses-multiple-keys.html
index 012c9bf3d00779c3bf7ac70a6931ee0ba90c50d5..fb3a5dd5a67de3e89c2e009051e0f830a19fb2b3 100644
--- a/third_party/WebKit/LayoutTests/media/encrypted-media/encrypted-media-keystatuses-multiple-keys.html
+++ b/third_party/WebKit/LayoutTests/media/encrypted-media/encrypted-media-keystatuses-multiple-keys.html
@@ -15,38 +15,39 @@
var initData;
// Create a list of multiple unique keyIds.
- var keyIds = [ stringToUint8Array('keyid'),
- stringToUint8Array('a really long keyid'),
- new Uint8Array([0,1,2,3]),
- new Uint8Array([0,1,2,3,4]),
- new Uint8Array([0,1,2,3,4,5]),
- new Uint8Array([0,1,2,3,4,6]),
- stringToUint8Array('7'),
- stringToUint8Array('8'),
- stringToUint8Array('9'),
- stringToUint8Array('10'),
- stringToUint8Array('11'),
- stringToUint8Array('12'),
- stringToUint8Array('13'),
- stringToUint8Array('14'),
- stringToUint8Array('15'),
- stringToUint8Array('16'),
- stringToUint8Array('17'),
- stringToUint8Array('18'),
- stringToUint8Array('19'),
- stringToUint8Array('20'),
- stringToUint8Array('21'),
- stringToUint8Array('22'),
- stringToUint8Array('23'),
- stringToUint8Array('24'),
- stringToUint8Array('25')
- ];
+ const keyIds = [
+ { keyId: stringToUint8Array('keyid'), status: 'usable' },
+ { keyId: stringToUint8Array('a really long keyid'), status: 'usable' },
+ { keyId: new Uint8Array([0,1,2,3]), status: 'usable' },
+ { keyId: new Uint8Array([0,1,2,3,4]), status: 'usable' },
+ { keyId: new Uint8Array([0,1,2,3,4,5]), status: 'usable' },
+ { keyId: new Uint8Array([0,1,2,3,4,6]), status: 'usable' },
+ { keyId: stringToUint8Array('7'), status: 'usable' },
+ { keyId: stringToUint8Array('8'), status: 'usable' },
+ { keyId: stringToUint8Array('9'), status: 'usable' },
+ { keyId: stringToUint8Array('10'), status: 'usable' },
+ { keyId: stringToUint8Array('11'), status: 'usable' },
+ { keyId: stringToUint8Array('12'), status: 'usable' },
+ { keyId: stringToUint8Array('13'), status: 'usable' },
+ { keyId: stringToUint8Array('14'), status: 'usable' },
+ { keyId: stringToUint8Array('15'), status: 'usable' },
+ { keyId: stringToUint8Array('16'), status: 'usable' },
+ { keyId: stringToUint8Array('17'), status: 'usable' },
+ { keyId: stringToUint8Array('18'), status: 'usable' },
+ { keyId: stringToUint8Array('19'), status: 'usable' },
+ { keyId: stringToUint8Array('20'), status: 'usable' },
+ { keyId: stringToUint8Array('21'), status: 'usable' },
+ { keyId: stringToUint8Array('22'), status: 'usable' },
+ { keyId: stringToUint8Array('23'), status: 'usable' },
+ { keyId: stringToUint8Array('24'), status: 'usable' },
+ { keyId: stringToUint8Array('25'), status: 'usable' }
+ ];
function processKeyStatusesChange(event)
{
// All 25 keyIds should be returned in keyStatuses.
- verifyKeyStatuses(mediaKeySession.keyStatuses, { expected: keyIds, unexpected: [] });
+ verifyKeyStatuses(mediaKeySession.keyStatuses, keyIds);
test.done();
}
@@ -60,7 +61,7 @@
// Use the same key for all 25 keyIds.
var rawKey = new Uint8Array([0xeb, 0xdd, 0x62, 0xf1, 0x68, 0x14, 0xd2, 0x7b,
0x68, 0xef, 0x12, 0x2a, 0xfc, 0xe4, 0xae, 0x3c]);
- var jwks = keyIds.map(function(keyId) { return createJWK(keyId, rawKey); });
+ var jwks = keyIds.map(function(item) { return createJWK(item.keyId, rawKey); });
var jwkSet = stringToUint8Array(createJWKSet.apply(this, jwks));
mediaKeySession.update(jwkSet).catch(function(error) {
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/media/encrypted-media/encrypted-media-keystatuses-multiple-sessions.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698