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

Unified Diff: LayoutTests/media/encrypted-media/encrypted-media-v2-syntax.html

Issue 806653004: Revert "Remove MediaKeys.isTypeSupported()." (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years 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-v2-syntax.html
diff --git a/LayoutTests/media/encrypted-media/encrypted-media-v2-syntax.html b/LayoutTests/media/encrypted-media/encrypted-media-v2-syntax.html
index 3fdf543d413ac46439ad91e48c2bb3c5a0fc04b8..79b199d5458dbd3c216541d13f420a46cb803c32 100644
--- a/LayoutTests/media/encrypted-media/encrypted-media-v2-syntax.html
+++ b/LayoutTests/media/encrypted-media/encrypted-media-v2-syntax.html
@@ -315,6 +315,8 @@
navigator.requestMediaKeySystemAccess('org.w3.clearkey').then(function(access) {
return access.createMediaKeys();
}).then(function(mediaKeys) {
+ // FIXME: Remove "video/" from the calls to isTypeSupported() once it is updated.
+ // http://crbug.com/405731.
var initData = stringToUint8Array('init data');
var sessionPromises = kGenerateRequestExceptionsTestCases.map(function(testCase) {
return test_exception(testCase, mediaKeys, '', initData);
@@ -322,7 +324,7 @@
// Test that WebM sessions generate the expected error, if
// supported.
- if (isInitDataTypeSupported('webm')) {
+ if (MediaKeys.isTypeSupported('org.w3.clearkey', 'video/webm')) {
var WebmSessionPromises = kTypeSpecificGenerateRequestExceptionsTestCases.map(function(testCase) {
return test_exception(testCase, mediaKeys, 'webm', getInitData('webm'));
});
@@ -330,7 +332,7 @@
}
// Repeat for MP4, if supported.
- if (isInitDataTypeSupported('cenc')) {
+ if (MediaKeys.isTypeSupported('org.w3.clearkey', 'video/mp4')) {
var mp4SessionPromises = kTypeSpecificGenerateRequestExceptionsTestCases.map(function(testCase) {
return test_exception(testCase, mediaKeys, 'cenc', getInitData('cenc'));
});
@@ -427,6 +429,8 @@
navigator.requestMediaKeySystemAccess('org.w3.clearkey').then(function(access) {
return access.createMediaKeys();
}).then(function(mediaKeys) {
+ // FIXME: Remove "video/" from the calls to isTypeSupported() once it is updated.
+ // http://crbug.com/405731.
var initData = stringToUint8Array('init data');
var sessionPromises = kLoadExceptionsTestCases.map(function(testCase) {
return test_exception(testCase, mediaKeys);
@@ -546,7 +550,7 @@
// Test that WebM sessions generate the expected error, if
// supported.
- if (isInitDataTypeSupported('webm')) {
+ if (MediaKeys.isTypeSupported('org.w3.clearkey', 'video/webm')) {
var WebmSessionPromises = kCreateSessionTestCases.map(function(testCase) {
return test_generateRequest(testCase, mediaKeys, 'webm', getInitData('webm'));
});
@@ -554,7 +558,7 @@
}
// Repeat for MP4, if supported.
- if (isInitDataTypeSupported('cenc')) {
+ if (MediaKeys.isTypeSupported('org.w3.clearkey', 'video/mp4')) {
var mp4SessionPromises = kCreateSessionTestCases.map(function(testCase) {
return test_generateRequest(testCase, mediaKeys, 'cenc', getInitData('cenc'));
});
@@ -611,7 +615,7 @@
}).then(function(mediaKeys) {
var promises = [];
- if (isInitDataTypeSupported('webm')) {
+ if (MediaKeys.isTypeSupported('org.w3.clearkey', 'video/webm')) {
var WebmSessionPromises = kUpdateSessionExceptionsTestCases.map(function(testCase) {
var mediaKeySession = mediaKeys.createSession();
return mediaKeySession.generateRequest('webm', getInitData('webm')).then(function(result) {
@@ -621,7 +625,7 @@
promises = promises.concat(WebmSessionPromises);
}
- if (isInitDataTypeSupported('cenc')) {
+ if (MediaKeys.isTypeSupported('org.w3.clearkey', 'video/mp4')) {
var mp4SessionPromises = kUpdateSessionExceptionsTestCases.map(function(testCase) {
var mediaKeySession = mediaKeys.createSession();
return mediaKeySession.generateRequest('cenc', getInitData('cenc')).then(function(result) {
@@ -662,11 +666,11 @@
}).then(function(mediaKeys) {
var promises = [];
- if (isInitDataTypeSupported('webm')) {
+ if (MediaKeys.isTypeSupported('org.w3.clearkey', 'video/webm')) {
promises.push(create_update_test(mediaKeys, 'webm', getInitData('webm')));
}
- if (isInitDataTypeSupported('cenc')) {
+ if (MediaKeys.isTypeSupported('org.w3.clearkey', 'video/mp4')) {
promises.push(create_update_test(mediaKeys, 'cenc', getInitData('cenc')));
}
@@ -698,11 +702,11 @@
}).then(function(mediaKeys) {
var promises = [];
- if (isInitDataTypeSupported('webm')) {
+ if (MediaKeys.isTypeSupported('org.w3.clearkey', 'video/webm')) {
promises.push(create_close_exception_test(mediaKeys, 'webm', getInitData('webm')));
}
- if (isInitDataTypeSupported('cenc')) {
+ if (MediaKeys.isTypeSupported('org.w3.clearkey', 'video/mp4')) {
promises.push(create_close_exception_test(mediaKeys, 'cenc', getInitData('cenc')));
}
@@ -736,11 +740,11 @@
}).then(function(mediaKeys) {
var promises = [];
- if (isInitDataTypeSupported('webm')) {
+ if (MediaKeys.isTypeSupported('org.w3.clearkey', 'video/webm')) {
promises.push(create_close_test(mediaKeys, 'webm', getInitData('webm')));
}
- if (isInitDataTypeSupported('cenc')) {
+ if (MediaKeys.isTypeSupported('org.w3.clearkey', 'video/mp4')) {
promises.push(create_close_test(mediaKeys, 'cenc', getInitData('cenc')));
}
@@ -795,11 +799,11 @@
}).then(function(mediaKeys) {
var promises = [];
- if (isInitDataTypeSupported('webm')) {
+ if (MediaKeys.isTypeSupported('org.w3.clearkey', 'video/webm')) {
promises.push(create_remove_exception_test(mediaKeys, 'webm', getInitData('webm')));
}
- if (isInitDataTypeSupported('cenc')) {
+ if (MediaKeys.isTypeSupported('org.w3.clearkey', 'video/mp4')) {
promises.push(create_remove_exception_test(mediaKeys, 'cenc', getInitData('cenc')));
}
@@ -835,11 +839,11 @@
}).then(function(mediaKeys) {
var promises = [];
- if (isInitDataTypeSupported('webm')) {
+ if (MediaKeys.isTypeSupported('org.w3.clearkey', 'video/webm')) {
promises.push(create_remove_test(mediaKeys, 'webm', getInitData('webm')));
}
- if (isInitDataTypeSupported('cenc')) {
+ if (MediaKeys.isTypeSupported('org.w3.clearkey', 'video/mp4')) {
promises.push(create_remove_test(mediaKeys, 'cenc', getInitData('cenc')));
}
« no previous file with comments | « LayoutTests/media/encrypted-media/encrypted-media-utils.js ('k') | Source/modules/encryptedmedia/MediaKeys.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698