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

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

Issue 2874663002: [subresource_filter] s/ShouldSuppressActivation/OnPageActivationComputed (Closed)
Patch Set: engedy review 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 2017 The Chromium Authors. All rights reserved. 1 // Copyright 2017 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/subresource_filter_safe_ browsing_activation_throttle.h" 5 #include "components/subresource_filter/content/browser/subresource_filter_safe_ browsing_activation_throttle.h"
6 6
7 #include <memory> 7 #include <memory>
8 #include <tuple> 8 #include <tuple>
9 #include <utility> 9 #include <utility>
10 10
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 }; 72 };
73 73
74 class MockSubresourceFilterClient 74 class MockSubresourceFilterClient
75 : public subresource_filter::SubresourceFilterClient { 75 : public subresource_filter::SubresourceFilterClient {
76 public: 76 public:
77 MockSubresourceFilterClient() {} 77 MockSubresourceFilterClient() {}
78 78
79 ~MockSubresourceFilterClient() override = default; 79 ~MockSubresourceFilterClient() override = default;
80 80
81 MOCK_METHOD1(ToggleNotificationVisibility, void(bool)); 81 MOCK_METHOD1(ToggleNotificationVisibility, void(bool));
82 MOCK_METHOD1(ShouldSuppressActivation, bool(content::NavigationHandle*)); 82 MOCK_METHOD2(OnPageActivationComputed,
83 bool(content::NavigationHandle*, bool));
83 MOCK_METHOD1(WhitelistByContentSettings, void(const GURL&)); 84 MOCK_METHOD1(WhitelistByContentSettings, void(const GURL&));
84 MOCK_METHOD1(WhitelistInCurrentWebContents, void(const GURL&)); 85 MOCK_METHOD1(WhitelistInCurrentWebContents, void(const GURL&));
85 MOCK_METHOD0(GetRulesetDealer, VerifiedRulesetDealer::Handle*()); 86 MOCK_METHOD0(GetRulesetDealer, VerifiedRulesetDealer::Handle*());
86 87
87 private: 88 private:
88 DISALLOW_COPY_AND_ASSIGN(MockSubresourceFilterClient); 89 DISALLOW_COPY_AND_ASSIGN(MockSubresourceFilterClient);
89 }; 90 };
90 91
91 // Throttle to call WillProcessResponse on the factory, which is otherwise 92 // Throttle to call WillProcessResponse on the factory, which is otherwise
92 // called by the ThrottleManager. 93 // called by the ThrottleManager.
(...skipping 394 matching lines...) Expand 10 before | Expand all | Expand 10 after
487 ::testing::Combine( 488 ::testing::Combine(
488 ::testing::Values( 489 ::testing::Values(
489 content::CancellingNavigationThrottle::WILL_START_REQUEST, 490 content::CancellingNavigationThrottle::WILL_START_REQUEST,
490 content::CancellingNavigationThrottle::WILL_REDIRECT_REQUEST, 491 content::CancellingNavigationThrottle::WILL_REDIRECT_REQUEST,
491 content::CancellingNavigationThrottle::WILL_PROCESS_RESPONSE), 492 content::CancellingNavigationThrottle::WILL_PROCESS_RESPONSE),
492 ::testing::Values( 493 ::testing::Values(
493 content::CancellingNavigationThrottle::SYNCHRONOUS, 494 content::CancellingNavigationThrottle::SYNCHRONOUS,
494 content::CancellingNavigationThrottle::ASYNCHRONOUS))); 495 content::CancellingNavigationThrottle::ASYNCHRONOUS)));
495 496
496 } // namespace subresource_filter 497 } // namespace subresource_filter
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698