OLD | NEW |
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/browser/loader/async_resource_handler.h" | 5 #include "content/browser/loader/async_resource_handler.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 #include <memory> | 9 #include <memory> |
10 #include <string> | 10 #include <string> |
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
186 false, // report_raw_headers | 186 false, // report_raw_headers |
187 true, // is_async | 187 true, // is_async |
188 false, // is_using_lofi | 188 false, // is_using_lofi |
189 std::string(), // original_headers | 189 std::string(), // original_headers |
190 nullptr, // body | 190 nullptr, // body |
191 false); // initiated_in_secure_context | 191 false); // initiated_in_secure_context |
192 info->AssociateWithRequest(request.get()); | 192 info->AssociateWithRequest(request.get()); |
193 std::unique_ptr<AsyncResourceHandler> handler = | 193 std::unique_ptr<AsyncResourceHandler> handler = |
194 base::MakeUnique<AsyncResourceHandler>(request.get(), &rdh_); | 194 base::MakeUnique<AsyncResourceHandler>(request.get(), &rdh_); |
195 loader_ = base::MakeUnique<ResourceLoader>( | 195 loader_ = base::MakeUnique<ResourceLoader>( |
196 std::move(request), std::move(handler), nullptr, this); | 196 std::move(request), std::move(handler), this); |
197 } | 197 } |
198 | 198 |
199 void StartRequestAndWaitWithResponseDataSize(size_t response_data_size) { | 199 void StartRequestAndWaitWithResponseDataSize(size_t response_data_size) { |
200 CreateRequestWithResponseDataSize(response_data_size); | 200 CreateRequestWithResponseDataSize(response_data_size); |
201 loader_->StartRequest(); | 201 loader_->StartRequest(); |
202 finish_waiter_.reset(new base::RunLoop); | 202 finish_waiter_.reset(new base::RunLoop); |
203 finish_waiter_->Run(); | 203 finish_waiter_->Run(); |
204 } | 204 } |
205 | 205 |
206 scoped_refptr<RecordingResourceMessageFilter> filter_; | 206 scoped_refptr<RecordingResourceMessageFilter> filter_; |
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
302 | 302 |
303 encoded_data_length = std::get<3>(params); | 303 encoded_data_length = std::get<3>(params); |
304 EXPECT_EQ(32768, encoded_data_length); | 304 EXPECT_EQ(32768, encoded_data_length); |
305 encoded_body_length = std::get<4>(params); | 305 encoded_body_length = std::get<4>(params); |
306 EXPECT_EQ(32768, encoded_body_length); | 306 EXPECT_EQ(32768, encoded_body_length); |
307 } | 307 } |
308 | 308 |
309 } // namespace | 309 } // namespace |
310 | 310 |
311 } // namespace content | 311 } // namespace content |
OLD | NEW |