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

Unified Diff: LayoutTests/media/encrypted-media/encrypted-media-events.html

Issue 1004843003: Use requestMediaKeySystemAccess() to check type support in EME layout tests (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Changes Created 5 years, 9 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
Index: LayoutTests/media/encrypted-media/encrypted-media-events.html
diff --git a/LayoutTests/media/encrypted-media/encrypted-media-events.html b/LayoutTests/media/encrypted-media/encrypted-media-events.html
index acd33dfd05b64c82331d74cdc4afad415d3990b7..917c902143e3acb336130570fc7c2170cee793dc 100644
--- a/LayoutTests/media/encrypted-media/encrypted-media-events.html
+++ b/LayoutTests/media/encrypted-media/encrypted-media-events.html
@@ -13,6 +13,7 @@
// "keychange" events.
async_test(function(test)
{
+ var initDataType;
var mediaKeySession;
var rawKey = new Uint8Array([0xeb, 0xdd, 0x62, 0xf1, 0x68, 0x14, 0xd2, 0x7b,
0x68, 0xef, 0x12, 0x2a, 0xfc, 0xe4, 0xae, 0x3c]);
@@ -42,10 +43,12 @@
test.done();
}
- navigator.requestMediaKeySystemAccess('org.w3.clearkey', [{}]).then(function(access) {
+ getSupportedInitDataType().then(function(type) {
+ initDataType = type;
+ return navigator.requestMediaKeySystemAccess('org.w3.clearkey', [{}]);
+ }).then(function(access) {
return access.createMediaKeys();
}).then(test.step_func(function(mediaKeys) {
- var initDataType = getInitDataType();
mediaKeySession = mediaKeys.createSession();
waitForEventAndRunStep('message', mediaKeySession, test.step_func(processMessage), test);
return mediaKeySession.generateRequest(initDataType, getInitData(initDataType));
sandersd (OOO until July 31) 2015/03/16 19:57:08 Why not the usual pattern of fetching this after g
jrummell 2015/03/16 20:44:09 Probably the first file I changed. Done.

Powered by Google App Engine
This is Rietveld 408576698