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

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

Issue 2396133003: Change the logic how Subesource Filter propagates activation. (Closed)
Patch Set: fix browser test Created 4 years, 2 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_navigation_throttle_unittests.cc
diff --git a/components/subresource_filter/content/browser/subresource_filter_navigation_throttle_unittests.cc b/components/subresource_filter/content/browser/subresource_filter_navigation_throttle_unittests.cc
index 952cbec896064677e512cb9c4280cf20dccd77e5..dbc6cffcb20f3c2de4e232b9204bf6429f0718da 100644
--- a/components/subresource_filter/content/browser/subresource_filter_navigation_throttle_unittests.cc
+++ b/components/subresource_filter/content/browser/subresource_filter_navigation_throttle_unittests.cc
@@ -142,9 +142,6 @@ TEST_F(SubresourceFilterNavigationThrottleTest, RequestWithoutRedirects) {
.Times(1);
SimulateWillProcessResponse();
::testing::Mock::VerifyAndClearExpectations(driver());
-
- EXPECT_EQ(1U, factory()->activation_set().size());
- EXPECT_TRUE(factory()->ShouldActivateForURL(url));
}
TEST_F(SubresourceFilterNavigationThrottleTest,
@@ -169,10 +166,6 @@ TEST_F(SubresourceFilterNavigationThrottleTest,
EXPECT_CALL(*driver(), ActivateForProvisionalLoad(::testing::_)).Times(0);
SimulateWillProcessResponse();
::testing::Mock::VerifyAndClearExpectations(driver());
-
- EXPECT_EQ(1U, factory()->activation_set().size());
- EXPECT_TRUE(factory()->ShouldActivateForURL(url_with_activation));
- EXPECT_FALSE(factory()->ShouldActivateForURL(url_without_activation));
}
TEST_F(SubresourceFilterNavigationThrottleTest,
@@ -196,9 +189,6 @@ TEST_F(SubresourceFilterNavigationThrottleTest,
EXPECT_CALL(*driver(), ActivateForProvisionalLoad(::testing::_)).Times(0);
SimulateWillProcessResponse();
::testing::Mock::VerifyAndClearExpectations(driver());
-
- EXPECT_EQ(0U, factory()->activation_set().size());
- EXPECT_FALSE(factory()->ShouldActivateForURL(non_web_url));
}
TEST_F(SubresourceFilterNavigationThrottleTest,
@@ -226,10 +216,6 @@ TEST_F(SubresourceFilterNavigationThrottleTest,
.Times(1);
SimulateWillProcessResponse();
::testing::Mock::VerifyAndClearExpectations(driver());
-
- EXPECT_EQ(2U, factory()->activation_set().size());
- EXPECT_TRUE(factory()->ShouldActivateForURL(url));
- EXPECT_TRUE(factory()->ShouldActivateForURL(redirect));
}
TEST_F(SubresourceFilterNavigationThrottleTest,
@@ -265,14 +251,6 @@ TEST_F(SubresourceFilterNavigationThrottleTest,
.Times(1);
SimulateWillProcessResponse();
::testing::Mock::VerifyAndClearExpectations(driver());
-
- EXPECT_EQ(redirects.size() + 2U, factory()->activation_set().size());
- EXPECT_TRUE(factory()->ShouldActivateForURL(url));
- EXPECT_TRUE(factory()->ShouldActivateForURL(first_redirect));
- EXPECT_TRUE(factory()->ShouldActivateForURL(second_redirect));
- EXPECT_TRUE(factory()->ShouldActivateForURL(third_redirect));
- EXPECT_TRUE(
- factory()->ShouldActivateForURL(redirect_after_sb_classification));
}
TEST_F(SubresourceFilterNavigationThrottleTest,
@@ -300,11 +278,6 @@ TEST_F(SubresourceFilterNavigationThrottleTest,
.Times(1);
SimulateWillProcessResponse();
::testing::Mock::VerifyAndClearExpectations(driver());
-
- EXPECT_EQ(3U, factory()->activation_set().size());
- EXPECT_TRUE(factory()->ShouldActivateForURL(init_url));
- EXPECT_TRUE(factory()->ShouldActivateForURL(redirect_with_match));
- EXPECT_TRUE(factory()->ShouldActivateForURL(final_url));
}
} // namespace subresource_filter

Powered by Google App Engine
This is Rietveld 408576698