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

Unified Diff: chrome/browser/media/encrypted_media_browsertest.cc

Issue 27230004: Do not run MSE related tests when MSE is not available. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 2 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
« no previous file with comments | « no previous file | content/browser/media/encrypted_media_browsertest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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));
« no previous file with comments | « no previous file | content/browser/media/encrypted_media_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698