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

Unified Diff: LayoutTests/media/encrypted-media/encrypted-media-async-creation-with-gc.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-async-creation-with-gc.html
diff --git a/LayoutTests/media/encrypted-media/encrypted-media-async-creation-with-gc.html b/LayoutTests/media/encrypted-media/encrypted-media-async-creation-with-gc.html
index 77487aaadf602b3574cfc2b9b65153ce436a02ce..0193d95a9d27686958a0086d325cd3ebc10a57bc 100644
--- a/LayoutTests/media/encrypted-media/encrypted-media-async-creation-with-gc.html
+++ b/LayoutTests/media/encrypted-media/encrypted-media-async-creation-with-gc.html
@@ -14,13 +14,18 @@
// Run garbage collection often.
setInterval(asyncGC, 0);
+ var initDataType;
+ var initData;
var mediaKeySession;
- navigator.requestMediaKeySystemAccess('org.w3.clearkey', [{}]).then(function(access) {
+ getSupportedInitDataType().then(function(type) {
+ initDataType = type;
+ initData = getInitData(initDataType);
+ return navigator.requestMediaKeySystemAccess('org.w3.clearkey', [{}]);
+ }).then(function(access) {
return access.createMediaKeys();
}).then(function(mediaKeys) {
- var initDataType = getInitDataType();
mediaKeySession = mediaKeys.createSession();
- return mediaKeySession.generateRequest(initDataType, getInitData(initDataType));
+ return mediaKeySession.generateRequest(initDataType, initData);
}).then(function() {
return mediaKeySession.close();
}).then(function(result) {

Powered by Google App Engine
This is Rietveld 408576698