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

Unified Diff: LayoutTests/media/encrypted-media/encrypted-media-clear-key-invalid-license.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-clear-key-invalid-license.html
diff --git a/LayoutTests/media/encrypted-media/encrypted-media-clear-key-invalid-license.html b/LayoutTests/media/encrypted-media/encrypted-media-clear-key-invalid-license.html
index 340db69d3f2797cbb14b19b6840725f5b11d0c8c..edaef98c493e80619342b0bb623cbd884f083f37 100644
--- a/LayoutTests/media/encrypted-media/encrypted-media-clear-key-invalid-license.html
+++ b/LayoutTests/media/encrypted-media/encrypted-media-clear-key-invalid-license.html
@@ -11,6 +11,8 @@
<script>
async_test(function(test)
{
+ var initDataType;
+ var initData;
var invalidLicense = new Uint8Array(
[0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77]);
@@ -28,12 +30,16 @@
});
}
- 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 keySession = mediaKeys.createSession();
keySession.addEventListener('message', handleMessage, false);
- keySession.generateRequest(getInitDataType(), getInitData(getInitDataType()));
+ keySession.generateRequest(initDataType, initData);
}).catch(function(error) {
forceTestFailureFromPromise(test, error);
});

Powered by Google App Engine
This is Rietveld 408576698