| 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 8f30094a88aaec7da5a463ed7b358d24a2a7d55e..60a512f8985c1b9e9da7493327f6396d47aeb0a5 100644
|
| --- a/content/browser/media/encrypted_media_browsertest.cc
|
| +++ b/content/browser/media/encrypted_media_browsertest.cc
|
| @@ -10,6 +10,9 @@
|
| #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"
|
| +#endif
|
|
|
| // Available key systems.
|
| static const char kClearKeyKeySystem[] = "webkit-org.w3.clearkey";
|
| @@ -59,6 +62,18 @@ class EncryptedMediaTest : public content::MediaBrowserTest,
|
| }
|
|
|
| void TestConfigChange() {
|
| + if (CurrentSourceType() != MSE) {
|
| + LOG(INFO) << "Skipping test - config change only applies to MSE.";
|
| + return;
|
| + }
|
| +
|
| +#if defined(OS_ANDROID)
|
| + if (base::android::BuildInfo::GetInstance()->sdk_int() < 16) {
|
| + LOG(INFO) << "Skipping test - MSE only supported in JellyBean and later.";
|
| + return;
|
| + }
|
| +#endif // defined(OS_ANDROID)
|
| +
|
| std::vector<StringPair> query_params;
|
| query_params.push_back(std::make_pair("keysystem", CurrentKeySystem()));
|
| query_params.push_back(std::make_pair("runencrypted", "1"));
|
| @@ -71,6 +86,14 @@ class EncryptedMediaTest : public content::MediaBrowserTest,
|
| const char* key_system,
|
| SrcType src_type,
|
| const char* expectation) {
|
| +#if defined(OS_ANDROID)
|
| + DCHECK_EQ(src_type, MSE) << "EME only works with MSE on Android.";
|
| + if (base::android::BuildInfo::GetInstance()->sdk_int() < 16) {
|
| + LOG(INFO) << "Skipping test - MSE only supported in JellyBean and later.";
|
| + return;
|
| + }
|
| +#endif // defined(OS_ANDROID)
|
| +
|
| std::vector<StringPair> query_params;
|
| query_params.push_back(std::make_pair("mediafile", media_file));
|
| query_params.push_back(std::make_pair("mediatype", media_type));
|
| @@ -111,7 +134,7 @@ using ::testing::Values;
|
| // Encrypted media playback with SRC is not supported on Android.
|
| INSTANTIATE_TEST_CASE_P(SRC_ClearKey, EncryptedMediaTest,
|
| Combine(Values(kClearKeyKeySystem), Values(SRC)));
|
| -#endif // defined(OS_ANDROID)
|
| +#endif // !defined(OS_ANDROID)
|
|
|
| INSTANTIATE_TEST_CASE_P(MSE_ClearKey, EncryptedMediaTest,
|
| Combine(Values(kClearKeyKeySystem), Values(MSE)));
|
|
|