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

Unified Diff: components/subresource_filter/content/browser/subresource_filter_safe_browsing_activation_throttle_unittest.cc

Issue 2838193002: Split the ScopedSubresourceFilterFeatureToggle into two helper classes. (Closed)
Patch Set: More polish. Created 3 years, 8 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: components/subresource_filter/content/browser/subresource_filter_safe_browsing_activation_throttle_unittest.cc
diff --git a/components/subresource_filter/content/browser/subresource_filter_safe_browsing_activation_throttle_unittest.cc b/components/subresource_filter/content/browser/subresource_filter_safe_browsing_activation_throttle_unittest.cc
index 3479cee5c95e8e55be56e03388fc59b8d5513b37..fdd3ac07b39ee52ed19945ffdd0a2c0192552135 100644
--- a/components/subresource_filter/content/browser/subresource_filter_safe_browsing_activation_throttle_unittest.cc
+++ b/components/subresource_filter/content/browser/subresource_filter_safe_browsing_activation_throttle_unittest.cc
@@ -109,10 +109,9 @@ class SubresourceFilterSafeBrowsingActivationThrottleTest
void SetUp() override {
content::RenderViewHostTestHarness::SetUp();
- scoped_feature_toggle_.reset(
- new testing::ScopedSubresourceFilterFeatureToggle(
- base::FeatureList::OVERRIDE_ENABLE_FEATURE, kActivationLevelEnabled,
- kActivationScopeActivationList, kActivationListSubresourceFilter));
+ scoped_configuration_.ResetConfiguration(Configuration(
+ ActivationLevel::ENABLED, ActivationScope::ACTIVATION_LIST,
Charlie Harrison 2017/04/25 19:36:21 #include activation_list, activation_scope, and ac
engedy 2017/04/25 20:13:24 Done.
+ ActivationList::SUBRESOURCE_FILTER));
// Note: Using NiceMock to allow uninteresting calls and suppress warnings.
auto client =
base::MakeUnique<::testing::NiceMock<MockSubresourceFilterClient>>();
@@ -175,8 +174,7 @@ class SubresourceFilterSafeBrowsingActivationThrottleTest
private:
base::FieldTrialList field_trial_list_;
- std::unique_ptr<testing::ScopedSubresourceFilterFeatureToggle>
- scoped_feature_toggle_;
+ testing::ScopedSubresourceFilterConfigurator scoped_configuration_;
std::unique_ptr<content::NavigationSimulator> navigation_simulator_;
scoped_refptr<FakeSafeBrowsingDatabaseManager> fake_safe_browsing_database_;
base::HistogramTester tester_;

Powered by Google App Engine
This is Rietveld 408576698