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

Unified Diff: chrome/browser/subresource_filter/subresource_filter_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/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 d3560fa349b4a6c0f299c6702fa5213d36ed23af..7c3cc36af921d80193ad0acfc5333f272e9f6a72 100644
--- a/chrome/browser/subresource_filter/subresource_filter_browsertest.cc
+++ b/chrome/browser/subresource_filter/subresource_filter_browsertest.cc
@@ -46,6 +46,7 @@
#include "components/safe_browsing_db/test_database_manager.h"
#include "components/safe_browsing_db/util.h"
#include "components/safe_browsing_db/v4_database.h"
+#include "components/safe_browsing_db/v4_feature_list.h"
#include "components/security_interstitials/content/unsafe_resource.h"
#include "components/subresource_filter/content/browser/async_document_subresource_filter.h"
#include "components/subresource_filter/content/browser/async_document_subresource_filter_test_utils.h"
@@ -206,12 +207,11 @@ class SubresourceFilterBrowserTest : public InProcessBrowserTest {
protected:
void SetUpCommandLine(base::CommandLine* command_line) override {
- command_line->AppendSwitchASCII(
- switches::kEnableFeatures,
- base::JoinString(
- {kSafeBrowsingSubresourceFilter.name, "SafeBrowsingV4OnlyEnabled",
- kSafeBrowsingSubresourceFilterExperimentalUI.name},
- ","));
+ scoped_feature_list_.InitWithFeatures(
+ {kSafeBrowsingSubresourceFilter,
+ kSafeBrowsingSubresourceFilterExperimentalUI,
+ features::kV4OnlyEnabled},
+ {});
}
void SetUp() override {
@@ -418,6 +418,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