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

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

Issue 2695333002: Mojo C++ bindings: remove usage of AssociatedGroup from content/ (Closed)
Patch Set: . Created 3 years, 10 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::Mojo, 35 blink::WebURLRequest::LoadingIPCType::Mojo,
36 url_loader_factory_proxy_.get(), 36 url_loader_factory_proxy_.get());
37 url_loader_factory_proxy_.associated_group());
38 request_peer_context_.request_id = request_id_; 37 request_peer_context_.request_id = request_id_;
39 38
40 base::RunLoop().RunUntilIdle(); 39 base::RunLoop().RunUntilIdle();
41 EXPECT_TRUE(url_loader_client_); 40 EXPECT_TRUE(url_loader_client_);
42 } 41 }
43 42
44 void TearDown() override { 43 void TearDown() override {
45 url_loader_client_ = nullptr; 44 url_loader_client_ = nullptr;
46 url_loader_factory_proxy_ = nullptr; 45 url_loader_factory_proxy_ = nullptr;
47 } 46 }
(...skipping 471 matching lines...) Expand 10 before | Expand all | Expand 10 after
519 518
520 dispatcher_->SetDefersLoading(request_id_, false); 519 dispatcher_->SetDefersLoading(request_id_, false);
521 base::RunLoop().RunUntilIdle(); 520 base::RunLoop().RunUntilIdle();
522 EXPECT_TRUE(request_peer_context_.received_response); 521 EXPECT_TRUE(request_peer_context_.received_response);
523 EXPECT_TRUE(request_peer_context_.complete); 522 EXPECT_TRUE(request_peer_context_.complete);
524 EXPECT_EQ(4, request_peer_context_.total_encoded_data_length); 523 EXPECT_EQ(4, request_peer_context_.total_encoded_data_length);
525 EXPECT_FALSE(request_peer_context_.cancelled); 524 EXPECT_FALSE(request_peer_context_.cancelled);
526 } 525 }
527 526
528 } // namespace content 527 } // namespace content
OLDNEW
« no previous file with comments | « content/child/url_loader_client_impl.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