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

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

Issue 2844063002: Add support for multiple simultaneous subresource_filter::Configurations. (Closed)
Patch Set: Minimal polish, still missing unittests for multiple simultaneous configs. 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/content_subresource_filter_driver_factory_unittest.cc
diff --git a/components/subresource_filter/content/browser/content_subresource_filter_driver_factory_unittest.cc b/components/subresource_filter/content/browser/content_subresource_filter_driver_factory_unittest.cc
index cb08eefd8395921510033df511472b131fe93bee..449f452f7d15ce6e550c24b6269f78021d9484ed 100644
--- a/components/subresource_filter/content/browser/content_subresource_filter_driver_factory_unittest.cc
+++ b/components/subresource_filter/content/browser/content_subresource_filter_driver_factory_unittest.cc
@@ -482,7 +482,8 @@ class ContentSubresourceFilterDriverFactoryTest
private:
static bool expected_measure_performance() {
const double rate = GetActiveConfigurations()
- ->the_one_and_only()
+ ->ordered_configs()
+ .front()
.performance_measurement_rate;
// Note: The case when 0 < rate < 1 is not deterministic, don't test it.
EXPECT_TRUE(rate == 0 || rate == 1);
@@ -763,7 +764,7 @@ TEST_P(ContentSubresourceFilterDriverFactoryActivationLevelTest,
factory()->client()->WhitelistInCurrentWebContents(url);
NavigateAndExpectActivation(
{true}, {GURL(kExampleUrlWithParams)}, NO_REDIRECTS_HIT,
- GetActiveConfigurations()->the_one_and_only().activation_level ==
+ GetActiveConfigurations()->ordered_configs().front().activation_level ==
ActivationLevel::DISABLED
? ActivationDecision::ACTIVATION_DISABLED
: ActivationDecision::URL_WHITELISTED);
@@ -811,7 +812,7 @@ TEST_P(ContentSubresourceFilterDriverFactoryActivationScopeTest,
NavigateAndExpectActivation(
{test_data.url_matches_activation_list}, {GURL(kExampleUrlWithParams)},
expected_pattern,
- GetActiveConfigurations()->the_one_and_only().activation_scope ==
+ GetActiveConfigurations()->ordered_configs().front().activation_scope ==
ActivationScope::NO_SITES
? ActivationDecision::ACTIVATION_DISABLED
: ActivationDecision::URL_WHITELISTED);
@@ -839,7 +840,7 @@ TEST_P(ContentSubresourceFilterDriverFactoryActivationScopeTest,
RedirectChainMatchPattern expected_pattern = EMPTY;
NavigateAndExpectActivation(
{test_data.url_matches_activation_list}, {GURL(url)}, expected_pattern,
- GetActiveConfigurations()->the_one_and_only().activation_scope ==
+ GetActiveConfigurations()->ordered_configs().front().activation_scope ==
ActivationScope::NO_SITES
? ActivationDecision::ACTIVATION_DISABLED
: ActivationDecision::UNSUPPORTED_SCHEME);

Powered by Google App Engine
This is Rietveld 408576698