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

Side by Side Diff: content/common/throttling_url_loader_unittest.cc

Issue 2914423002: Network service: move URLLoaderThrottle and ThrottlingURLLoader. (Closed)
Patch Set: Created 3 years, 6 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
« no previous file with comments | « content/common/throttling_url_loader.cc ('k') | content/public/child/BUILD.gn » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "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
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
OLDNEW
« no previous file with comments | « content/common/throttling_url_loader.cc ('k') | content/public/child/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698