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

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

Issue 2910843002: [Cleanup] Move all browsertests to use ScopedFeatureList to modify features
Patch Set: rebase update Created 3 years, 6 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
Index: chrome/browser/media/encrypted_media_supported_types_browsertest.cc
diff --git a/chrome/browser/media/encrypted_media_supported_types_browsertest.cc b/chrome/browser/media/encrypted_media_supported_types_browsertest.cc
index 9f8104cb572ac5b88602b18f86a7c6537e4e21ff..391692d09ad9eeb42f8b37f6428b2b7022c68a3d 100644
--- a/chrome/browser/media/encrypted_media_supported_types_browsertest.cc
+++ b/chrome/browser/media/encrypted_media_supported_types_browsertest.cc
@@ -12,6 +12,7 @@
#include "base/files/file_path.h"
#include "base/path_service.h"
#include "base/strings/utf_string_conversions.h"
+#include "base/test/scoped_feature_list.h"
#include "base/threading/platform_thread.h"
#include "base/time/time.h"
#include "build/build_config.h"
@@ -303,9 +304,12 @@ class EncryptedMediaSupportedTypesExternalClearKeyTest
media::kClearKeyCdmAdapterFileName,
media::kClearKeyCdmDisplayName,
media::kClearKeyCdmPepperMimeType);
- command_line->AppendSwitchASCII(switches::kEnableFeatures,
- media::kExternalClearKeyForTesting.name);
+ scoped_feature_list_.InitAndEnableFeature(
+ media::kExternalClearKeyForTesting);
Ilya Sherman 2017/06/12 21:50:29 Could this be done outside of SetUpCommandLine()?
chaopeng 2017/06/28 19:21:22 Done.
}
+
+ private:
+ base::test::ScopedFeatureList scoped_feature_list_;
#endif // BUILDFLAG(ENABLE_PEPPER_CDMS)
};
@@ -342,9 +346,13 @@ class EncryptedMediaSupportedTypesClearKeyCDMRegisteredWithWrongPathTest
"clearkeycdmadapterwrongname.dll",
media::kClearKeyCdmDisplayName,
media::kClearKeyCdmPepperMimeType, false);
- command_line->AppendSwitchASCII(switches::kEnableFeatures,
- media::kExternalClearKeyForTesting.name);
+
+ scoped_feature_list_.InitAndEnableFeature(
+ media::kExternalClearKeyForTesting);
Ilya Sherman 2017/06/12 21:50:29 Could this be done outside of SetUpCommandLine()?
chaopeng 2017/06/28 19:21:22 Done.
}
+
+ private:
+ base::test::ScopedFeatureList scoped_feature_list_;
};
// Registers Widevine CDM with the wrong path (filename).

Powered by Google App Engine
This is Rietveld 408576698