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..832ba94a47319f7ebe7ccd7cd8809a3222f172f5 100644 |
--- a/chrome/browser/media/encrypted_media_browsertest.cc |
+++ b/chrome/browser/media/encrypted_media_browsertest.cc |
@@ -11,6 +11,7 @@ |
#include "chrome/browser/ui/tabs/tab_strip_model.h" |
#include "chrome/common/chrome_switches.h" |
#include "content/public/test/browser_test_utils.h" |
+#include "third_party/WebKit/public/web/WebRuntimeFeatures.h" |
xhwang
2013/10/14 20:12:47
This violates DEPS rules [1]. But since we set Web
qinmin
2013/10/14 20:59:45
Maybe add a function IsMSESupported() somewhere in
ddorwin
2013/10/14 21:30:34
I would rather run the tests unless we explicitly
xhwang
2013/10/16 07:58:40
Instead of checking android version, we can just c
ddorwin
2013/10/16 20:17:17
If the MediaCodecBridge availability code breaks,
|
#include "widevine_cdm_version.h" // In SHARED_INTERMEDIATE_DIR. |
@@ -96,12 +97,25 @@ class EncryptedMediaTest : public MediaBrowserTest, |
} |
void TestConfigChange() { |
+ if (CurrentSourceType() != MSE) { |
+ LOG(INFO) << "Skipping test - config change only applies to MSE."; |
+ return; |
+ } |
+ |
+ // TODO(xhwang): Update this to check for unprefixed MSE API when |
ddorwin
2013/10/14 21:30:34
A helper function also allows this to be encapsula
xhwang
2013/10/16 07:58:40
Done.
|
+ // http://crbug.com/307107 is fixed. |
+ if (!WebKit::WebRuntimeFeatures::isWebKitMediaSourceEnabled()) { |
+ LOG(INFO) << "Could not run test - prefixed MSE not supported."; |
+ return; |
+ } |
+ |
#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 +128,14 @@ class EncryptedMediaTest : public MediaBrowserTest, |
const char* key_system, |
SrcType src_type, |
const char* expectation) { |
+ // TODO(xhwang): Update this to check for unprefixed MSE API when |
+ // http://crbug.com/307107 is fixed. |
+ if (src_type == MSE && |
ddorwin
2013/10/14 21:30:34
Where do we prevent SRC tests from running on Andr
xhwang
2013/10/16 07:58:40
I only fixed content_browsertest and haven't fixed
ddorwin
2013/10/16 20:17:17
Should we drop the MSE check then? It seems EME wo
xhwang
2013/10/16 21:41:17
Done. I also fixed browser_tests to support Androi
|
+ !WebKit::WebRuntimeFeatures::isWebKitMediaSourceEnabled()) { |
+ LOG(INFO) << "Could not run test - prefixed MSE not supported."; |
+ return; |
+ } |
+ |
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)); |