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

Unified Diff: chrome/browser/subresource_filter/subresource_filter_browsertest.cc

Issue 2910843002: [Cleanup] Move all browsertests to use ScopedFeatureList to modify features
Patch Set: Ilya comments addressed 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/subresource_filter/subresource_filter_browsertest.cc
diff --git a/chrome/browser/subresource_filter/subresource_filter_browsertest.cc b/chrome/browser/subresource_filter/subresource_filter_browsertest.cc
index 59b45a38884c6c6005415fca6f348c5b893954d8..2ed29b4b994c9d559c1145a70925daea4826faf6 100644
--- a/chrome/browser/subresource_filter/subresource_filter_browsertest.cc
+++ b/chrome/browser/subresource_filter/subresource_filter_browsertest.cc
@@ -44,6 +44,7 @@
#include "chrome/test/base/ui_test_utils.h"
#include "components/content_settings/core/browser/host_content_settings_map.h"
#include "components/content_settings/core/common/content_settings.h"
+#include "components/safe_browsing_db/features.h"
#include "components/safe_browsing_db/test_database_manager.h"
#include "components/safe_browsing_db/util.h"
#include "components/safe_browsing_db/v4_database.h"
@@ -209,16 +210,13 @@ class SubresourceFilterBrowserTest : public InProcessBrowserTest {
~SubresourceFilterBrowserTest() override {}
protected:
- void SetUpCommandLine(base::CommandLine* command_line) override {
- command_line->AppendSwitchASCII(
- switches::kEnableFeatures,
- base::JoinString(
- {kSafeBrowsingSubresourceFilter.name, "SafeBrowsingV4OnlyEnabled",
- kSafeBrowsingSubresourceFilterExperimentalUI.name},
- ","));
- }
-
void SetUp() override {
+ scoped_feature_list_.InitWithFeatures(
+ {kSafeBrowsingSubresourceFilter,
+ kSafeBrowsingSubresourceFilterExperimentalUI,
+ features::kV4OnlyEnabled},
+ {});
+
sb_factory_ =
base::MakeUnique<safe_browsing::TestSafeBrowsingServiceFactory>(
safe_browsing::V4FeatureList::V4UsageStatus::V4_ONLY);
@@ -422,6 +420,8 @@ class SubresourceFilterBrowserTest : public InProcessBrowserTest {
// Owned by the profile.
SubresourceFilterContentSettingsManager* settings_manager_;
+ base::test::ScopedFeatureList scoped_feature_list_;
+
DISALLOW_COPY_AND_ASSIGN(SubresourceFilterBrowserTest);
};

Powered by Google App Engine
This is Rietveld 408576698