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

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: fix compile error 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..56135cc6f1f1c6ae631a4deea73bc43143930e0c 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"
@@ -18,6 +19,10 @@
// Available key systems.
const char kClearKeyKeySystem[] = "org.w3.clearkey";
+#if defined(OS_ANDROID)
+const char kExternalClearKeyKeySystem[] = "org.chromium.externalclearkey";
+#endif
+
// Supported media types.
const char kWebMAudioOnly[] = "audio/webm; codecs=\"vorbis\"";
const char kWebMVideoOnly[] = "video/webm; codecs=\"vp8\"";
@@ -204,4 +209,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
ddorwin 2016/09/14 01:06:27 This difference and all the ifdefs are unfortunate
xhwang 2016/09/16 18:49:58 Acknowledged.
+// tested in browser_tests.
+IN_PROC_BROWSER_TEST_F(EncryptedMediaTest, ExternalClearKeyPlayback) {
+ RunSimpleEncryptedMediaTest("bear-320x240-av_enc-av.webm", kWebMAudioVideo,
+ kExternalClearKeyKeySystem, MSE);
+}
+#endif
+
} // namespace content

Powered by Google App Engine
This is Rietveld 408576698