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/child/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/common/url_loader.mojom.h" |
11 #include "content/common/url_loader_factory.mojom.h" | 11 #include "content/common/url_loader_factory.mojom.h" |
12 #include "content/public/child/url_loader_throttle.h" | 12 #include "content/public/common/url_loader_throttle.h" |
13 #include "testing/gtest/include/gtest/gtest.h" | 13 #include "testing/gtest/include/gtest/gtest.h" |
14 | 14 |
15 namespace content { | 15 namespace content { |
16 namespace { | 16 namespace { |
17 | 17 |
18 class TestURLLoaderFactory : public mojom::URLLoaderFactory { | 18 class TestURLLoaderFactory : public mojom::URLLoaderFactory { |
19 public: | 19 public: |
20 TestURLLoaderFactory() : binding_(this) { | 20 TestURLLoaderFactory() : binding_(this) { |
21 binding_.Bind(mojo::MakeRequest(&factory_ptr_)); | 21 binding_.Bind(mojo::MakeRequest(&factory_ptr_)); |
22 } | 22 } |
(...skipping 528 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
551 EXPECT_EQ(0u, throttle_->will_redirect_request_called()); | 551 EXPECT_EQ(0u, throttle_->will_redirect_request_called()); |
552 EXPECT_EQ(1u, throttle_->will_process_response_called()); | 552 EXPECT_EQ(1u, throttle_->will_process_response_called()); |
553 | 553 |
554 EXPECT_EQ(0u, client_.on_received_response_called()); | 554 EXPECT_EQ(0u, client_.on_received_response_called()); |
555 EXPECT_EQ(0u, client_.on_received_redirect_called()); | 555 EXPECT_EQ(0u, client_.on_received_redirect_called()); |
556 EXPECT_EQ(1u, client_.on_complete_called()); | 556 EXPECT_EQ(1u, client_.on_complete_called()); |
557 } | 557 } |
558 | 558 |
559 } // namespace | 559 } // namespace |
560 } // namespace content | 560 } // namespace content |
OLD | NEW |