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

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

Issue 2038813003: Making ResourceRequestBody part of //content's public API. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebasing... Created 4 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/child/web_url_loader_impl.cc ('k') | content/child/web_url_request_util.h » ('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 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 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 ResourceDispatcher(nullptr, nullptr), 61 ResourceDispatcher(nullptr, nullptr),
62 canceled_(false), 62 canceled_(false),
63 defers_loading_(false) { 63 defers_loading_(false) {
64 } 64 }
65 65
66 ~TestResourceDispatcher() override {} 66 ~TestResourceDispatcher() override {}
67 67
68 // TestDispatcher implementation: 68 // TestDispatcher implementation:
69 69
70 int StartAsync(const RequestInfo& request_info, 70 int StartAsync(const RequestInfo& request_info,
71 ResourceRequestBody* request_body, 71 ResourceRequestBodyImpl* request_body,
72 std::unique_ptr<RequestPeer> peer) override { 72 std::unique_ptr<RequestPeer> peer) override {
73 EXPECT_FALSE(peer_); 73 EXPECT_FALSE(peer_);
74 peer_ = std::move(peer); 74 peer_ = std::move(peer);
75 url_ = request_info.url; 75 url_ = request_info.url;
76 stream_url_ = request_info.resource_body_stream_url; 76 stream_url_ = request_info.resource_body_stream_url;
77 return 1; 77 return 1;
78 } 78 }
79 79
80 void Cancel(int request_id) override { 80 void Cancel(int request_id) override {
81 EXPECT_FALSE(canceled_); 81 EXPECT_FALSE(canceled_);
(...skipping 588 matching lines...) Expand 10 before | Expand all | Expand 10 after
670 info.socket_address = net::HostPortPair(test.ip, 443); 670 info.socket_address = net::HostPortPair(test.ip, 443);
671 blink::WebURLResponse response; 671 blink::WebURLResponse response;
672 response.initialize(); 672 response.initialize();
673 WebURLLoaderImpl::PopulateURLResponse(url, info, &response, true); 673 WebURLLoaderImpl::PopulateURLResponse(url, info, &response, true);
674 EXPECT_EQ(test.expected, response.remoteIPAddress().utf8()); 674 EXPECT_EQ(test.expected, response.remoteIPAddress().utf8());
675 }; 675 };
676 } 676 }
677 677
678 } // namespace 678 } // namespace
679 } // namespace content 679 } // namespace content
OLDNEW
« no previous file with comments | « content/child/web_url_loader_impl.cc ('k') | content/child/web_url_request_util.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698