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

Side by Side Diff: components/subresource_filter/content/browser/content_subresource_filter_driver_factory_unittest.cc

Issue 2890253002: [subresource_filter] Move OnReloadRequested to the ChromeClient (Closed)
Patch Set: rebase on #473448 Created 3 years, 7 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 unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "components/subresource_filter/content/browser/content_subresource_filt er_driver_factory.h" 5 #include "components/subresource_filter/content/browser/content_subresource_filt er_driver_factory.h"
6 6
7 #include <set> 7 #include <set>
8 #include <string> 8 #include <string>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after
171 : ruleset_dealer_(ruleset_dealer) {} 171 : ruleset_dealer_(ruleset_dealer) {}
172 172
173 ~MockSubresourceFilterClient() override = default; 173 ~MockSubresourceFilterClient() override = default;
174 174
175 bool OnPageActivationComputed(content::NavigationHandle* handle, 175 bool OnPageActivationComputed(content::NavigationHandle* handle,
176 bool activated) override { 176 bool activated) override {
177 DCHECK(handle->IsInMainFrame()); 177 DCHECK(handle->IsInMainFrame());
178 return whitelisted_hosts_.count(handle->GetURL().host()); 178 return whitelisted_hosts_.count(handle->GetURL().host());
179 } 179 }
180 180
181 void WhitelistByContentSettings(const GURL& url) override {}
182 void WhitelistInCurrentWebContents(const GURL& url) override { 181 void WhitelistInCurrentWebContents(const GURL& url) override {
183 ASSERT_TRUE(url.SchemeIsHTTPOrHTTPS()); 182 ASSERT_TRUE(url.SchemeIsHTTPOrHTTPS());
184 whitelisted_hosts_.insert(url.host()); 183 whitelisted_hosts_.insert(url.host());
185 } 184 }
186 185
187 VerifiedRulesetDealer::Handle* GetRulesetDealer() override { 186 VerifiedRulesetDealer::Handle* GetRulesetDealer() override {
188 return ruleset_dealer_; 187 return ruleset_dealer_;
189 } 188 }
190 189
191 MOCK_METHOD1(ToggleNotificationVisibility, void(bool)); 190 MOCK_METHOD1(ToggleNotificationVisibility, void(bool));
(...skipping 570 matching lines...) Expand 10 before | Expand all | Expand 10 after
762 ActivationScopeTest, 761 ActivationScopeTest,
763 ContentSubresourceFilterDriverFactoryActivationScopeTest, 762 ContentSubresourceFilterDriverFactoryActivationScopeTest,
764 ::testing::ValuesIn(kActivationScopeTestData)); 763 ::testing::ValuesIn(kActivationScopeTestData));
765 764
766 INSTANTIATE_TEST_CASE_P( 765 INSTANTIATE_TEST_CASE_P(
767 ActivationLevelTest, 766 ActivationLevelTest,
768 ContentSubresourceFilterDriverFactoryActivationLevelTest, 767 ContentSubresourceFilterDriverFactoryActivationLevelTest,
769 ::testing::ValuesIn(kActivationLevelTestData)); 768 ::testing::ValuesIn(kActivationLevelTestData));
770 769
771 } // namespace subresource_filter 770 } // namespace subresource_filter
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698