| Index: components/subresource_filter/content/browser/content_subresource_filter_throttle_manager_unittest.cc
|
| diff --git a/components/subresource_filter/content/browser/content_subresource_filter_throttle_manager_unittest.cc b/components/subresource_filter/content/browser/content_subresource_filter_throttle_manager_unittest.cc
|
| index c020f88c01c0204158632a57ae981276e3f31a50..baf987ecf93532b8400a8e3409e1686de1c401f4 100644
|
| --- a/components/subresource_filter/content/browser/content_subresource_filter_throttle_manager_unittest.cc
|
| +++ b/components/subresource_filter/content/browser/content_subresource_filter_throttle_manager_unittest.cc
|
| @@ -4,7 +4,10 @@
|
|
|
| #include "components/subresource_filter/content/browser/content_subresource_filter_throttle_manager.h"
|
|
|
| +#include <map>
|
| #include <memory>
|
| +#include <set>
|
| +#include <tuple>
|
| #include <utility>
|
|
|
| #include "base/logging.h"
|
| @@ -83,8 +86,12 @@ class MockPageStateActivationThrottle : public content::NavigationThrottle {
|
| if (throttle_state == activation_throttle_state_) {
|
| auto it = mock_page_activations_.find(navigation_handle()->GetURL());
|
| if (it != mock_page_activations_.end()) {
|
| - throttle_manager_->NotifyPageActivationComputed(navigation_handle(),
|
| - it->second);
|
| + throttle_manager_->NotifyPageActivationComputed(
|
| + navigation_handle(), it->second, ActivationDecision::ACTIVATED);
|
| + } else {
|
| + throttle_manager_->NotifyPageActivationComputed(
|
| + navigation_handle(), ActivationState(ActivationLevel::DISABLED),
|
| + ActivationDecision::ACTIVATION_LIST_NOT_MATCHED);
|
| }
|
| }
|
| return content::NavigationThrottle::PROCEED;
|
| @@ -260,8 +267,10 @@ class ContentSubresourceFilterThrottleManagerTest
|
| ::testing::UnitTest::GetInstance()->current_test_info()->value_param()
|
| ? GetParam()
|
| : WILL_PROCESS_RESPONSE;
|
| - throttles.push_back(base::MakeUnique<MockPageStateActivationThrottle>(
|
| - navigation_handle, state, throttle_manager_.get()));
|
| + if (navigation_handle->IsInMainFrame()) {
|
| + throttles.push_back(base::MakeUnique<MockPageStateActivationThrottle>(
|
| + navigation_handle, state, throttle_manager_.get()));
|
| + }
|
| throttle_manager_->MaybeAppendNavigationThrottles(navigation_handle,
|
| &throttles);
|
| for (auto& it : throttles) {
|
|
|