OLD | NEW |
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 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
67 class MockSubresourceFilterClient | 67 class MockSubresourceFilterClient |
68 : public subresource_filter::SubresourceFilterClient { | 68 : public subresource_filter::SubresourceFilterClient { |
69 public: | 69 public: |
70 MockSubresourceFilterClient() {} | 70 MockSubresourceFilterClient() {} |
71 | 71 |
72 ~MockSubresourceFilterClient() override = default; | 72 ~MockSubresourceFilterClient() override = default; |
73 | 73 |
74 MOCK_METHOD1(ToggleNotificationVisibility, void(bool)); | 74 MOCK_METHOD1(ToggleNotificationVisibility, void(bool)); |
75 MOCK_METHOD2(OnPageActivationComputed, | 75 MOCK_METHOD2(OnPageActivationComputed, |
76 bool(content::NavigationHandle*, bool)); | 76 bool(content::NavigationHandle*, bool)); |
77 MOCK_METHOD1(WhitelistByContentSettings, void(const GURL&)); | |
78 MOCK_METHOD1(WhitelistInCurrentWebContents, void(const GURL&)); | 77 MOCK_METHOD1(WhitelistInCurrentWebContents, void(const GURL&)); |
79 MOCK_METHOD0(GetRulesetDealer, VerifiedRulesetDealer::Handle*()); | 78 MOCK_METHOD0(GetRulesetDealer, VerifiedRulesetDealer::Handle*()); |
80 | 79 |
81 private: | 80 private: |
82 DISALLOW_COPY_AND_ASSIGN(MockSubresourceFilterClient); | 81 DISALLOW_COPY_AND_ASSIGN(MockSubresourceFilterClient); |
83 }; | 82 }; |
84 | 83 |
85 // Throttle to call WillProcessResponse on the factory, which is otherwise | 84 // Throttle to call WillProcessResponse on the factory, which is otherwise |
86 // called by the ThrottleManager. | 85 // called by the ThrottleManager. |
87 class TestForwardingNavigationThrottle : public content::NavigationThrottle { | 86 class TestForwardingNavigationThrottle : public content::NavigationThrottle { |
(...skipping 557 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
645 ::testing::Values( | 644 ::testing::Values( |
646 content::CancellingNavigationThrottle::SYNCHRONOUS, | 645 content::CancellingNavigationThrottle::SYNCHRONOUS, |
647 content::CancellingNavigationThrottle::ASYNCHRONOUS))); | 646 content::CancellingNavigationThrottle::ASYNCHRONOUS))); |
648 | 647 |
649 INSTANTIATE_TEST_CASE_P( | 648 INSTANTIATE_TEST_CASE_P( |
650 ActivationLevelTest, | 649 ActivationLevelTest, |
651 SubresourceFilterSafeBrowsingActivationThrottleParamTest, | 650 SubresourceFilterSafeBrowsingActivationThrottleParamTest, |
652 ::testing::ValuesIn(kActivationListTestData)); | 651 ::testing::ValuesIn(kActivationListTestData)); |
653 | 652 |
654 } // namespace subresource_filter | 653 } // namespace subresource_filter |
OLD | NEW |