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

Unified Diff: content/browser/media/encrypted_media_browsertest.cc

Issue 2268283003: media: Add External Clear Key content browser test on Android (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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: content/browser/media/encrypted_media_browsertest.cc
diff --git a/content/browser/media/encrypted_media_browsertest.cc b/content/browser/media/encrypted_media_browsertest.cc
index 53afea3c3d5368454884f5b8e6bc871daf6c86c1..b20d3c592758ed5f6e1020016684040b46b687a5 100644
--- a/content/browser/media/encrypted_media_browsertest.cc
+++ b/content/browser/media/encrypted_media_browsertest.cc
@@ -10,6 +10,7 @@
#include "content/public/common/content_switches.h"
#include "content/public/test/browser_test_utils.h"
#include "content/shell/browser/shell.h"
+
#if defined(OS_ANDROID)
#include "base/android/build_info.h"
#include "media/base/media.h"
@@ -17,6 +18,7 @@
// Available key systems.
const char kClearKeyKeySystem[] = "org.w3.clearkey";
+const char kExternalClearKeyKeySystem[] = "org.chromium.externalclearkey";
jrummell 2016/08/24 20:36:52 No complaints about unused value if !OS_ANDROID?
xhwang 2016/08/24 23:31:03 Done.
// Supported media types.
const char kWebMAudioOnly[] = "audio/webm; codecs=\"vorbis\"";
@@ -204,4 +206,15 @@ IN_PROC_BROWSER_TEST_F(EncryptedMediaTest, UnknownKeySystemThrowsException) {
kEmeNotSupportedError);
}
+#if defined(OS_ANDROID)
+// On Android, External Clear Key is supported in shell/ by using mojo CDM
+// with AesDecryptor running in the GPU process.
+// On other platforms, External Clear Key is supported in chrome/, so it is
+// tested in browser_tests.
jrummell 2016/08/24 20:36:53 If this is already supported, why not run it? The
xhwang 2016/08/24 23:31:03 As discussed offline, ECK on desktop is not suppor
+IN_PROC_BROWSER_TEST_F(EncryptedMediaTest, ExternalClearKeyPlayback) {
+ RunSimpleEncryptedMediaTest("bear-320x240-av_enc-av.webm", kWebMAudioVideo,
jrummell 2016/08/24 20:36:52 The similar ClearKey test checks media::PlatformHa
xhwang 2016/08/24 23:31:03 That check is for opus. I specifically chose a non
jrummell 2016/08/25 00:14:13 I missed that. I just looked for the previous test
+ kExternalClearKeyKeySystem, MSE);
+}
+#endif
+
} // namespace content

Powered by Google App Engine
This is Rietveld 408576698