| 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..19d3dde973fcad8d73443587a2ec404621c7dc03 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"
|
| +#include "third_party/WebKit/public/web/WebRuntimeFeatures.h"
|
|
|
| // Available key systems.
|
| static const char kClearKeyKeySystem[] = "webkit-org.w3.clearkey";
|
| @@ -59,6 +60,18 @@ class EncryptedMediaTest : public content::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
|
| + // http://crbug.com/307107 is fixed.
|
| + if (!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("keysystem", CurrentKeySystem()));
|
| query_params.push_back(std::make_pair("runencrypted", "1"));
|
| @@ -71,6 +84,14 @@ class EncryptedMediaTest : public content::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 &&
|
| + !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));
|
| @@ -111,7 +132,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)));
|
|
|