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

Side by Side Diff: content/child/url_loader_client_impl_unittest.cc

Issue 2813243002: network service: pass PlzNavigate resulting data via mojo data pipe (Closed)
Patch Set: ahem Created 3 years, 8 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
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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/url_loader_client_impl.h" 5 #include "content/child/url_loader_client_impl.h"
6 6
7 #include <vector> 7 #include <vector>
8 #include "base/memory/ptr_util.h" 8 #include "base/memory/ptr_util.h"
9 #include "base/message_loop/message_loop.h" 9 #include "base/message_loop/message_loop.h"
10 #include "base/run_loop.h" 10 #include "base/run_loop.h"
(...skipping 15 matching lines...) Expand all
26 URLLoaderClientImplTest() 26 URLLoaderClientImplTest()
27 : dispatcher_(new ResourceDispatcher(this, message_loop_.task_runner())), 27 : dispatcher_(new ResourceDispatcher(this, message_loop_.task_runner())),
28 mojo_binding_(this) { 28 mojo_binding_(this) {
29 url_loader_factory_proxy_ = mojo_binding_.CreateInterfacePtrAndBind(); 29 url_loader_factory_proxy_ = mojo_binding_.CreateInterfacePtrAndBind();
30 30
31 request_id_ = dispatcher_->StartAsync( 31 request_id_ = dispatcher_->StartAsync(
32 base::MakeUnique<ResourceRequest>(), 0, nullptr, url::Origin(), 32 base::MakeUnique<ResourceRequest>(), 0, nullptr, url::Origin(),
33 base::MakeUnique<TestRequestPeer>(dispatcher_.get(), 33 base::MakeUnique<TestRequestPeer>(dispatcher_.get(),
34 &request_peer_context_), 34 &request_peer_context_),
35 blink::WebURLRequest::LoadingIPCType::kMojo, 35 blink::WebURLRequest::LoadingIPCType::kMojo,
36 url_loader_factory_proxy_.get()); 36 url_loader_factory_proxy_.get(), mojo::ScopedDataPipeConsumerHandle());
37 request_peer_context_.request_id = request_id_; 37 request_peer_context_.request_id = request_id_;
38 38
39 base::RunLoop().RunUntilIdle(); 39 base::RunLoop().RunUntilIdle();
40 EXPECT_TRUE(url_loader_client_); 40 EXPECT_TRUE(url_loader_client_);
41 } 41 }
42 42
43 void TearDown() override { 43 void TearDown() override {
44 url_loader_client_ = nullptr; 44 url_loader_client_ = nullptr;
45 url_loader_factory_proxy_ = nullptr; 45 url_loader_factory_proxy_ = nullptr;
46 } 46 }
(...skipping 470 matching lines...) Expand 10 before | Expand all | Expand 10 after
517 517
518 dispatcher_->SetDefersLoading(request_id_, false); 518 dispatcher_->SetDefersLoading(request_id_, false);
519 base::RunLoop().RunUntilIdle(); 519 base::RunLoop().RunUntilIdle();
520 EXPECT_TRUE(request_peer_context_.received_response); 520 EXPECT_TRUE(request_peer_context_.received_response);
521 EXPECT_TRUE(request_peer_context_.complete); 521 EXPECT_TRUE(request_peer_context_.complete);
522 EXPECT_EQ(4, request_peer_context_.total_encoded_data_length); 522 EXPECT_EQ(4, request_peer_context_.total_encoded_data_length);
523 EXPECT_FALSE(request_peer_context_.cancelled); 523 EXPECT_FALSE(request_peer_context_.cancelled);
524 } 524 }
525 525
526 } // namespace content 526 } // namespace content
OLDNEW
« no previous file with comments | « content/child/resource_dispatcher_unittest.cc ('k') | content/child/url_response_body_consumer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698