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 "content/common/throttling_url_loader.h" | 5 #include "content/common/throttling_url_loader.h" |
6 #include "base/logging.h" | 6 #include "base/logging.h" |
7 #include "base/macros.h" | 7 #include "base/macros.h" |
8 #include "base/message_loop/message_loop.h" | 8 #include "base/message_loop/message_loop.h" |
9 #include "base/run_loop.h" | 9 #include "base/run_loop.h" |
10 #include "content/common/url_loader.mojom.h" | 10 #include "content/public/common/url_loader.mojom.h" |
11 #include "content/common/url_loader_factory.mojom.h" | 11 #include "content/public/common/url_loader_factory.mojom.h" |
12 #include "content/public/common/url_loader_throttle.h" | 12 #include "content/public/common/url_loader_throttle.h" |
13 #include "net/traffic_annotation/network_traffic_annotation_test_helper.h" | 13 #include "net/traffic_annotation/network_traffic_annotation_test_helper.h" |
14 #include "testing/gtest/include/gtest/gtest.h" | 14 #include "testing/gtest/include/gtest/gtest.h" |
15 | 15 |
16 namespace content { | 16 namespace content { |
17 namespace { | 17 namespace { |
18 | 18 |
19 class TestURLLoaderFactory : public mojom::URLLoaderFactory { | 19 class TestURLLoaderFactory : public mojom::URLLoaderFactory { |
20 public: | 20 public: |
21 TestURLLoaderFactory() : binding_(this) { | 21 TestURLLoaderFactory() : binding_(this) { |
(...skipping 532 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
554 EXPECT_EQ(0u, throttle_->will_redirect_request_called()); | 554 EXPECT_EQ(0u, throttle_->will_redirect_request_called()); |
555 EXPECT_EQ(1u, throttle_->will_process_response_called()); | 555 EXPECT_EQ(1u, throttle_->will_process_response_called()); |
556 | 556 |
557 EXPECT_EQ(0u, client_.on_received_response_called()); | 557 EXPECT_EQ(0u, client_.on_received_response_called()); |
558 EXPECT_EQ(0u, client_.on_received_redirect_called()); | 558 EXPECT_EQ(0u, client_.on_received_redirect_called()); |
559 EXPECT_EQ(1u, client_.on_complete_called()); | 559 EXPECT_EQ(1u, client_.on_complete_called()); |
560 } | 560 } |
561 | 561 |
562 } // namespace | 562 } // namespace |
563 } // namespace content | 563 } // namespace content |
OLD | NEW |