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

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

Issue 2650673002: WebURLLoaderImplTest should not depend on LoadingIPCType (Closed)
Patch Set: Created 3 years, 11 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 | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/web_url_loader_impl.h" 5 #include "content/child/web_url_loader_impl.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 #include <string.h> 8 #include <string.h>
9 9
10 #include <utility> 10 #include <utility>
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 int StartAsync( 78 int StartAsync(
79 std::unique_ptr<ResourceRequest> request, 79 std::unique_ptr<ResourceRequest> request,
80 int routing_id, 80 int routing_id,
81 scoped_refptr<base::SingleThreadTaskRunner> loading_task_runner, 81 scoped_refptr<base::SingleThreadTaskRunner> loading_task_runner,
82 const url::Origin& frame_origin, 82 const url::Origin& frame_origin,
83 std::unique_ptr<RequestPeer> peer, 83 std::unique_ptr<RequestPeer> peer,
84 blink::WebURLRequest::LoadingIPCType ipc_type, 84 blink::WebURLRequest::LoadingIPCType ipc_type,
85 mojom::URLLoaderFactory* url_loader_factory, 85 mojom::URLLoaderFactory* url_loader_factory,
86 mojo::AssociatedGroup* associated_group) override { 86 mojo::AssociatedGroup* associated_group) override {
87 EXPECT_FALSE(peer_); 87 EXPECT_FALSE(peer_);
88 EXPECT_EQ(blink::WebURLRequest::LoadingIPCType::ChromeIPC, ipc_type);
89 peer_ = std::move(peer); 88 peer_ = std::move(peer);
90 url_ = request->url; 89 url_ = request->url;
91 stream_url_ = request->resource_body_stream_url; 90 stream_url_ = request->resource_body_stream_url;
92 return 1; 91 return 1;
93 } 92 }
94 93
95 void Cancel(int request_id) override { 94 void Cancel(int request_id) override {
96 EXPECT_FALSE(canceled_); 95 EXPECT_FALSE(canceled_);
97 canceled_ = true; 96 canceled_ = true;
98 } 97 }
(...skipping 590 matching lines...) Expand 10 before | Expand all | Expand 10 after
689 int64_t encoded_body_length = 0; 688 int64_t encoded_body_length = 0;
690 client()->loader()->loadSynchronously( 689 client()->loader()->loadSynchronously(
691 request, response, error, data, encoded_data_length, encoded_body_length); 690 request, response, error, data, encoded_data_length, encoded_body_length);
692 691
693 EXPECT_EQ(kEncodedBodyLength, encoded_body_length); 692 EXPECT_EQ(kEncodedBodyLength, encoded_body_length);
694 EXPECT_EQ(kEncodedDataLength, encoded_data_length); 693 EXPECT_EQ(kEncodedDataLength, encoded_data_length);
695 } 694 }
696 695
697 } // namespace 696 } // namespace
698 } // namespace content 697 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698