Chromium Code Reviews| Index: chrome/browser/media/encrypted_media_browsertest.cc |
| diff --git a/chrome/browser/media/encrypted_media_browsertest.cc b/chrome/browser/media/encrypted_media_browsertest.cc |
| index 850d16c3d42e2523e6dcb03050d405eb3dca8e05..2ffb32c171d02171e704566b433b61b40880d5cf 100644 |
| --- a/chrome/browser/media/encrypted_media_browsertest.cc |
| +++ b/chrome/browser/media/encrypted_media_browsertest.cc |
| @@ -11,6 +11,9 @@ |
| #include "chrome/browser/ui/tabs/tab_strip_model.h" |
| #include "chrome/common/chrome_switches.h" |
| #include "content/public/test/browser_test_utils.h" |
| +#if defined(OS_ANDROID) |
| +#include "media/base/android/media_codec_bridge.h" |
| +#endif |
| #include "widevine_cdm_version.h" // In SHARED_INTERMEDIATE_DIR. |
| @@ -96,12 +99,25 @@ class EncryptedMediaTest : public MediaBrowserTest, |
| } |
| void TestConfigChange() { |
| + if (CurrentSourceType() != MSE) { |
| + LOG(INFO) << "Skipping test - config change only applies to MSE."; |
| + return; |
| + } |
| + |
| +#if defined(OS_ANDROID) |
| + if (!media::MediaCodecBridge::IsAvailable()) { |
|
ddorwin
2013/10/16 20:17:17
As mentioned in PS1, I don't think we should rely
xhwang
2013/10/16 21:41:17
Done.
|
| + LOG(INFO) << "Could not run test - MSE not supported."; |
|
ddorwin
2013/10/16 20:17:17
An explicit check also allows you to say why here
xhwang
2013/10/16 21:41:17
Done.
|
| + return; |
| + } |
| +#endif // defined(OS_ANDROID) |
| + |
| #if defined(WIDEVINE_CDM_AVAILABLE) |
| if (IsWidevine(CurrentKeySystem())) { |
| LOG(INFO) << "ConfigChange test cannot run with Widevine."; |
| return; |
| } |
| #endif // defined(WIDEVINE_CDM_AVAILABLE) |
| + |
| std::vector<StringPair> query_params; |
| query_params.push_back(std::make_pair("keysystem", CurrentKeySystem())); |
| query_params.push_back(std::make_pair("runencrypted", "1")); |
| @@ -114,6 +130,13 @@ class EncryptedMediaTest : public MediaBrowserTest, |
| const char* key_system, |
| SrcType src_type, |
| const char* expectation) { |
| +#if defined(OS_ANDROID) |
| + if (src_type == MSE && !media::MediaCodecBridge::IsAvailable()) { |
| + LOG(INFO) << "Could not run test - MSE not supported."; |
| + 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)); |