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

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

Issue 2691423006: Introduce the ThrottleManager (Closed)
Patch Set: Created 3 years, 10 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/activation_state_computing_navigation_throttle_unittest.cc
diff --git a/components/subresource_filter/content/browser/activation_state_computing_navigation_throttle_unittest.cc b/components/subresource_filter/content/browser/activation_state_computing_navigation_throttle_unittest.cc
index f1832165ff538938feb9f557930a5a3cb7c2fcc7..b9589351f8569e30f64ec9ce9c60b78e016bc723 100644
--- a/components/subresource_filter/content/browser/activation_state_computing_navigation_throttle_unittest.cc
+++ b/components/subresource_filter/content/browser/activation_state_computing_navigation_throttle_unittest.cc
@@ -107,7 +107,8 @@ class ActivationStateComputingNavigationThrottleTest
first_url, subframe_);
std::unique_ptr<ActivationStateComputingNavigationThrottle> throttle =
ActivationStateComputingNavigationThrottle::CreateForSubframe(
- test_handle_.get(), ruleset_handle(), parent_activation_state);
+ test_handle_.get(), ruleset_handle(), parent_activation_state,
+ base::OnceClosure());
test_throttle_ = throttle.get();
test_handle_->RegisterThrottleForTesting(std::move(throttle));
}
@@ -181,7 +182,8 @@ TEST_F(ActivationStateComputingNavigationThrottleTest, ActivateMainFrame) {
GURL("http://example.test/activate.html?v=1"));
test_throttle()->NotifyPageActivationWithRuleset(
- ruleset_handle(), ActivationState(ActivationLevel::ENABLED));
+ ruleset_handle(), ActivationState(ActivationLevel::ENABLED),
+ base::OnceClosure());
SimulateWillProcessResponseAndExpectResult(
true /* expect_async */, content::NavigationThrottle::PROCEED);
@@ -219,7 +221,7 @@ TEST_F(ActivationStateComputingNavigationThrottleTest,
// Notify that the page level state is explicitly disabled. Should be
// equivalent to not sending the message at all.
test_throttle()->NotifyPageActivationWithRuleset(
- nullptr, ActivationState(ActivationLevel::DISABLED));
+ nullptr, ActivationState(ActivationLevel::DISABLED), base::OnceClosure());
SimulateWillProcessResponseAndExpectResult(
false /* expect_async */, content::NavigationThrottle::PROCEED);
@@ -239,7 +241,8 @@ TEST_F(ActivationStateComputingNavigationThrottleTest,
// Main frames will usually have their "parent" activation state set right
// before WillProcessResponse.
test_throttle()->NotifyPageActivationWithRuleset(
- ruleset_handle(), ActivationState(ActivationLevel::ENABLED));
+ ruleset_handle(), ActivationState(ActivationLevel::ENABLED),
+ base::OnceClosure());
SimulateWillProcessResponseAndExpectResult(
true /* expect_async */, content::NavigationThrottle::PROCEED);

Powered by Google App Engine
This is Rietveld 408576698