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

Unified Diff: LayoutTests/media/encrypted-media/encrypted-media-keystatuses.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-keystatuses.html
diff --git a/LayoutTests/media/encrypted-media/encrypted-media-keystatuses.html b/LayoutTests/media/encrypted-media/encrypted-media-keystatuses.html
index 1c8493bb78c806b4ff8f885720b4a8afe5d0d281..44dc6f334d992b4f0f76f2ec3461376441eacfed 100644
--- a/LayoutTests/media/encrypted-media/encrypted-media-keystatuses.html
+++ b/LayoutTests/media/encrypted-media/encrypted-media-keystatuses.html
@@ -10,6 +10,8 @@
<div id="log"></div>
<script>
var mediaKeySession;
+ var initDataType;
+ var initData;
// Even though key ids are uint8, using printable values so that
// they can be verified easily.
@@ -98,17 +100,20 @@
test.done();
}
- 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();
// There should be no keys defined yet.
assert_equals(mediaKeySession.keyStatuses.size, 0);
waitForEventAndRunStep('message', mediaKeySession, processMessage, test);
- return mediaKeySession.generateRequest(initDataType, getInitData(initDataType));
+ return mediaKeySession.generateRequest(initDataType, initData);
}).catch(function(error) {
forceTestFailureFromPromise(test, error);
});

Powered by Google App Engine
This is Rietveld 408576698