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/url_loader_factory_impl.h" | 5 #include "content/browser/loader/url_loader_factory_impl.h" |
6 | 6 |
7 #include <stdint.h> | 7 #include <stdint.h> |
8 | 8 |
9 #include <memory> | 9 #include <memory> |
10 #include <string> | 10 #include <string> |
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
153 TestURLLoaderClient client; | 153 TestURLLoaderClient client; |
154 // Assume the file contents is small enough to be stored in the data pipe. | 154 // Assume the file contents is small enough to be stored in the data pipe. |
155 request.url = net::URLRequestMockHTTPJob::GetMockUrl("hello.html"); | 155 request.url = net::URLRequestMockHTTPJob::GetMockUrl("hello.html"); |
156 request.method = "GET"; | 156 request.method = "GET"; |
157 // |resource_type| can't be a frame type. It is because when PlzNavigate is | 157 // |resource_type| can't be a frame type. It is because when PlzNavigate is |
158 // enabled, the url scheme of frame type requests from the renderer process | 158 // enabled, the url scheme of frame type requests from the renderer process |
159 // must be blob scheme. | 159 // must be blob scheme. |
160 request.resource_type = RESOURCE_TYPE_XHR; | 160 request.resource_type = RESOURCE_TYPE_XHR; |
161 // Need to set |request_initiator| for non main frame type request. | 161 // Need to set |request_initiator| for non main frame type request. |
162 request.request_initiator = url::Origin(); | 162 request.request_initiator = url::Origin(); |
163 factory_->CreateLoaderAndStart( | 163 factory_->CreateLoaderAndStart(mojo::MakeRequest(&loader), kRoutingId, |
164 mojo::MakeRequest(&loader, factory_.associated_group()), kRoutingId, | 164 kRequestId, request, |
165 kRequestId, request, | 165 client.CreateRemoteAssociatedPtrInfo()); |
166 client.CreateRemoteAssociatedPtrInfo(factory_.associated_group())); | |
167 | 166 |
168 ASSERT_FALSE(client.has_received_response()); | 167 ASSERT_FALSE(client.has_received_response()); |
169 ASSERT_FALSE(client.response_body().is_valid()); | 168 ASSERT_FALSE(client.response_body().is_valid()); |
170 ASSERT_FALSE(client.has_received_completion()); | 169 ASSERT_FALSE(client.has_received_completion()); |
171 | 170 |
172 client.RunUntilResponseReceived(); | 171 client.RunUntilResponseReceived(); |
173 | 172 |
174 net::URLRequest* url_request = | 173 net::URLRequest* url_request = |
175 rdh_.GetURLRequest(GlobalRequestID(kChildId, kRequestId)); | 174 rdh_.GetURLRequest(GlobalRequestID(kChildId, kRequestId)); |
176 ASSERT_TRUE(url_request); | 175 ASSERT_TRUE(url_request); |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
230 net::URLRequestFailedJob::AddUrlHandler(); | 229 net::URLRequestFailedJob::AddUrlHandler(); |
231 request.url = net::URLRequestFailedJob::GetMockHttpUrlWithFailurePhase( | 230 request.url = net::URLRequestFailedJob::GetMockHttpUrlWithFailurePhase( |
232 net::URLRequestFailedJob::START, net::ERR_TIMED_OUT); | 231 net::URLRequestFailedJob::START, net::ERR_TIMED_OUT); |
233 request.method = "GET"; | 232 request.method = "GET"; |
234 // |resource_type| can't be a frame type. It is because when PlzNavigate is | 233 // |resource_type| can't be a frame type. It is because when PlzNavigate is |
235 // enabled, the url scheme of frame type requests from the renderer process | 234 // enabled, the url scheme of frame type requests from the renderer process |
236 // must be blob scheme. | 235 // must be blob scheme. |
237 request.resource_type = RESOURCE_TYPE_XHR; | 236 request.resource_type = RESOURCE_TYPE_XHR; |
238 // Need to set |request_initiator| for non main frame type request. | 237 // Need to set |request_initiator| for non main frame type request. |
239 request.request_initiator = url::Origin(); | 238 request.request_initiator = url::Origin(); |
240 factory_->CreateLoaderAndStart( | 239 factory_->CreateLoaderAndStart(mojo::MakeRequest(&loader), 2, 1, request, |
241 mojo::MakeRequest(&loader, factory_.associated_group()), 2, 1, request, | 240 client.CreateRemoteAssociatedPtrInfo()); |
242 client.CreateRemoteAssociatedPtrInfo(factory_.associated_group())); | |
243 | 241 |
244 client.RunUntilComplete(); | 242 client.RunUntilComplete(); |
245 ASSERT_FALSE(client.has_received_response()); | 243 ASSERT_FALSE(client.has_received_response()); |
246 ASSERT_FALSE(client.response_body().is_valid()); | 244 ASSERT_FALSE(client.response_body().is_valid()); |
247 | 245 |
248 EXPECT_EQ(net::ERR_TIMED_OUT, client.completion_status().error_code); | 246 EXPECT_EQ(net::ERR_TIMED_OUT, client.completion_status().error_code); |
249 EXPECT_EQ(0, client.completion_status().encoded_data_length); | 247 EXPECT_EQ(0, client.completion_status().encoded_data_length); |
250 EXPECT_EQ(0, client.completion_status().encoded_body_length); | 248 EXPECT_EQ(0, client.completion_status().encoded_body_length); |
251 } | 249 } |
252 | 250 |
253 // In this case, the loading fails after receiving a response. | 251 // In this case, the loading fails after receiving a response. |
254 TEST_P(URLLoaderFactoryImplTest, GetFailedResponse2) { | 252 TEST_P(URLLoaderFactoryImplTest, GetFailedResponse2) { |
255 NavigationResourceThrottle::set_ui_checks_always_succeed_for_testing(true); | 253 NavigationResourceThrottle::set_ui_checks_always_succeed_for_testing(true); |
256 mojom::URLLoaderAssociatedPtr loader; | 254 mojom::URLLoaderAssociatedPtr loader; |
257 ResourceRequest request; | 255 ResourceRequest request; |
258 TestURLLoaderClient client; | 256 TestURLLoaderClient client; |
259 net::URLRequestFailedJob::AddUrlHandler(); | 257 net::URLRequestFailedJob::AddUrlHandler(); |
260 request.url = net::URLRequestFailedJob::GetMockHttpUrlWithFailurePhase( | 258 request.url = net::URLRequestFailedJob::GetMockHttpUrlWithFailurePhase( |
261 net::URLRequestFailedJob::READ_ASYNC, net::ERR_TIMED_OUT); | 259 net::URLRequestFailedJob::READ_ASYNC, net::ERR_TIMED_OUT); |
262 request.method = "GET"; | 260 request.method = "GET"; |
263 // |resource_type| can't be a frame type. It is because when PlzNavigate is | 261 // |resource_type| can't be a frame type. It is because when PlzNavigate is |
264 // enabled, the url scheme of frame type requests from the renderer process | 262 // enabled, the url scheme of frame type requests from the renderer process |
265 // must be blob scheme. | 263 // must be blob scheme. |
266 request.resource_type = RESOURCE_TYPE_XHR; | 264 request.resource_type = RESOURCE_TYPE_XHR; |
267 // Need to set |request_initiator| for non main frame type request. | 265 // Need to set |request_initiator| for non main frame type request. |
268 request.request_initiator = url::Origin(); | 266 request.request_initiator = url::Origin(); |
269 factory_->CreateLoaderAndStart( | 267 factory_->CreateLoaderAndStart(mojo::MakeRequest(&loader), 2, 1, request, |
270 mojo::MakeRequest(&loader, factory_.associated_group()), 2, 1, request, | 268 client.CreateRemoteAssociatedPtrInfo()); |
271 client.CreateRemoteAssociatedPtrInfo(factory_.associated_group())); | |
272 | 269 |
273 client.RunUntilComplete(); | 270 client.RunUntilComplete(); |
274 ASSERT_FALSE(client.has_received_response()); | 271 ASSERT_FALSE(client.has_received_response()); |
275 ASSERT_FALSE(client.response_body().is_valid()); | 272 ASSERT_FALSE(client.response_body().is_valid()); |
276 | 273 |
277 EXPECT_EQ(net::ERR_TIMED_OUT, client.completion_status().error_code); | 274 EXPECT_EQ(net::ERR_TIMED_OUT, client.completion_status().error_code); |
278 EXPECT_GT(client.completion_status().encoded_data_length, 0); | 275 EXPECT_GT(client.completion_status().encoded_data_length, 0); |
279 EXPECT_EQ(0, client.completion_status().encoded_body_length); | 276 EXPECT_EQ(0, client.completion_status().encoded_body_length); |
280 } | 277 } |
281 | 278 |
282 // This test tests a case where resource loading is cancelled before started. | 279 // This test tests a case where resource loading is cancelled before started. |
283 TEST_P(URLLoaderFactoryImplTest, InvalidURL) { | 280 TEST_P(URLLoaderFactoryImplTest, InvalidURL) { |
284 mojom::URLLoaderAssociatedPtr loader; | 281 mojom::URLLoaderAssociatedPtr loader; |
285 ResourceRequest request; | 282 ResourceRequest request; |
286 TestURLLoaderClient client; | 283 TestURLLoaderClient client; |
287 request.url = GURL(); | 284 request.url = GURL(); |
288 request.method = "GET"; | 285 request.method = "GET"; |
289 // |resource_type| can't be a frame type. It is because when PlzNavigate is | 286 // |resource_type| can't be a frame type. It is because when PlzNavigate is |
290 // enabled, the url scheme of frame type requests from the renderer process | 287 // enabled, the url scheme of frame type requests from the renderer process |
291 // must be blob scheme. | 288 // must be blob scheme. |
292 request.resource_type = RESOURCE_TYPE_XHR; | 289 request.resource_type = RESOURCE_TYPE_XHR; |
293 // Need to set |request_initiator| for non main frame type request. | 290 // Need to set |request_initiator| for non main frame type request. |
294 request.request_initiator = url::Origin(); | 291 request.request_initiator = url::Origin(); |
295 ASSERT_FALSE(request.url.is_valid()); | 292 ASSERT_FALSE(request.url.is_valid()); |
296 factory_->CreateLoaderAndStart( | 293 factory_->CreateLoaderAndStart(mojo::MakeRequest(&loader), 2, 1, request, |
297 mojo::MakeRequest(&loader, factory_.associated_group()), 2, 1, request, | 294 client.CreateRemoteAssociatedPtrInfo()); |
298 client.CreateRemoteAssociatedPtrInfo(factory_.associated_group())); | |
299 | 295 |
300 client.RunUntilComplete(); | 296 client.RunUntilComplete(); |
301 ASSERT_FALSE(client.has_received_response()); | 297 ASSERT_FALSE(client.has_received_response()); |
302 ASSERT_FALSE(client.response_body().is_valid()); | 298 ASSERT_FALSE(client.response_body().is_valid()); |
303 | 299 |
304 EXPECT_EQ(net::ERR_ABORTED, client.completion_status().error_code); | 300 EXPECT_EQ(net::ERR_ABORTED, client.completion_status().error_code); |
305 } | 301 } |
306 | 302 |
307 // This test tests a case where resource loading is cancelled before started. | 303 // This test tests a case where resource loading is cancelled before started. |
308 TEST_P(URLLoaderFactoryImplTest, ShouldNotRequestURL) { | 304 TEST_P(URLLoaderFactoryImplTest, ShouldNotRequestURL) { |
309 mojom::URLLoaderAssociatedPtr loader; | 305 mojom::URLLoaderAssociatedPtr loader; |
310 RejectingResourceDispatcherHostDelegate rdh_delegate; | 306 RejectingResourceDispatcherHostDelegate rdh_delegate; |
311 rdh_.SetDelegate(&rdh_delegate); | 307 rdh_.SetDelegate(&rdh_delegate); |
312 ResourceRequest request; | 308 ResourceRequest request; |
313 TestURLLoaderClient client; | 309 TestURLLoaderClient client; |
314 request.url = GURL("http://localhost/"); | 310 request.url = GURL("http://localhost/"); |
315 request.method = "GET"; | 311 request.method = "GET"; |
316 // |resource_type| can't be a frame type. It is because when PlzNavigate is | 312 // |resource_type| can't be a frame type. It is because when PlzNavigate is |
317 // enabled, the url scheme of frame type requests from the renderer process | 313 // enabled, the url scheme of frame type requests from the renderer process |
318 // must be blob scheme. | 314 // must be blob scheme. |
319 request.resource_type = RESOURCE_TYPE_XHR; | 315 request.resource_type = RESOURCE_TYPE_XHR; |
320 // Need to set |request_initiator| for non main frame type request. | 316 // Need to set |request_initiator| for non main frame type request. |
321 request.request_initiator = url::Origin(); | 317 request.request_initiator = url::Origin(); |
322 factory_->CreateLoaderAndStart( | 318 factory_->CreateLoaderAndStart(mojo::MakeRequest(&loader), 2, 1, request, |
323 mojo::MakeRequest(&loader, factory_.associated_group()), 2, 1, request, | 319 client.CreateRemoteAssociatedPtrInfo()); |
324 client.CreateRemoteAssociatedPtrInfo(factory_.associated_group())); | |
325 | 320 |
326 client.RunUntilComplete(); | 321 client.RunUntilComplete(); |
327 rdh_.SetDelegate(nullptr); | 322 rdh_.SetDelegate(nullptr); |
328 | 323 |
329 ASSERT_FALSE(client.has_received_response()); | 324 ASSERT_FALSE(client.has_received_response()); |
330 ASSERT_FALSE(client.response_body().is_valid()); | 325 ASSERT_FALSE(client.response_body().is_valid()); |
331 | 326 |
332 EXPECT_EQ(net::ERR_ABORTED, client.completion_status().error_code); | 327 EXPECT_EQ(net::ERR_ABORTED, client.completion_status().error_code); |
333 } | 328 } |
334 | 329 |
335 TEST_P(URLLoaderFactoryImplTest, DownloadToFile) { | 330 TEST_P(URLLoaderFactoryImplTest, DownloadToFile) { |
336 constexpr int32_t kRoutingId = 1; | 331 constexpr int32_t kRoutingId = 1; |
337 constexpr int32_t kRequestId = 2; | 332 constexpr int32_t kRequestId = 2; |
338 | 333 |
339 mojom::URLLoaderAssociatedPtr loader; | 334 mojom::URLLoaderAssociatedPtr loader; |
340 base::FilePath root; | 335 base::FilePath root; |
341 PathService::Get(DIR_TEST_DATA, &root); | 336 PathService::Get(DIR_TEST_DATA, &root); |
342 net::URLRequestMockHTTPJob::AddUrlHandlers(root, | 337 net::URLRequestMockHTTPJob::AddUrlHandlers(root, |
343 BrowserThread::GetBlockingPool()); | 338 BrowserThread::GetBlockingPool()); |
344 | 339 |
345 ResourceRequest request; | 340 ResourceRequest request; |
346 TestURLLoaderClient client; | 341 TestURLLoaderClient client; |
347 request.url = net::URLRequestMockHTTPJob::GetMockUrl("hello.html"); | 342 request.url = net::URLRequestMockHTTPJob::GetMockUrl("hello.html"); |
348 request.method = "GET"; | 343 request.method = "GET"; |
349 request.resource_type = RESOURCE_TYPE_XHR; | 344 request.resource_type = RESOURCE_TYPE_XHR; |
350 request.download_to_file = true; | 345 request.download_to_file = true; |
351 request.request_initiator = url::Origin(); | 346 request.request_initiator = url::Origin(); |
352 factory_->CreateLoaderAndStart( | 347 factory_->CreateLoaderAndStart(mojo::MakeRequest(&loader), kRoutingId, |
353 mojo::MakeRequest(&loader, factory_.associated_group()), kRoutingId, | 348 kRequestId, request, |
354 kRequestId, request, | 349 client.CreateRemoteAssociatedPtrInfo()); |
355 client.CreateRemoteAssociatedPtrInfo(factory_.associated_group())); | |
356 ASSERT_FALSE(client.has_received_response()); | 350 ASSERT_FALSE(client.has_received_response()); |
357 ASSERT_FALSE(client.has_data_downloaded()); | 351 ASSERT_FALSE(client.has_data_downloaded()); |
358 ASSERT_FALSE(client.has_received_completion()); | 352 ASSERT_FALSE(client.has_received_completion()); |
359 | 353 |
360 client.RunUntilResponseReceived(); | 354 client.RunUntilResponseReceived(); |
361 | 355 |
362 net::URLRequest* url_request = | 356 net::URLRequest* url_request = |
363 rdh_.GetURLRequest(GlobalRequestID(kChildId, kRequestId)); | 357 rdh_.GetURLRequest(GlobalRequestID(kChildId, kRequestId)); |
364 ASSERT_TRUE(url_request); | 358 ASSERT_TRUE(url_request); |
365 ResourceRequestInfoImpl* request_info = | 359 ResourceRequestInfoImpl* request_info = |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
410 PathService::Get(DIR_TEST_DATA, &root); | 404 PathService::Get(DIR_TEST_DATA, &root); |
411 net::URLRequestSlowDownloadJob::AddUrlHandler(); | 405 net::URLRequestSlowDownloadJob::AddUrlHandler(); |
412 | 406 |
413 ResourceRequest request; | 407 ResourceRequest request; |
414 TestURLLoaderClient client; | 408 TestURLLoaderClient client; |
415 request.url = GURL(net::URLRequestSlowDownloadJob::kKnownSizeUrl); | 409 request.url = GURL(net::URLRequestSlowDownloadJob::kKnownSizeUrl); |
416 request.method = "GET"; | 410 request.method = "GET"; |
417 request.resource_type = RESOURCE_TYPE_XHR; | 411 request.resource_type = RESOURCE_TYPE_XHR; |
418 request.download_to_file = true; | 412 request.download_to_file = true; |
419 request.request_initiator = url::Origin(); | 413 request.request_initiator = url::Origin(); |
420 factory_->CreateLoaderAndStart( | 414 factory_->CreateLoaderAndStart(mojo::MakeRequest(&loader), kRoutingId, |
421 mojo::MakeRequest(&loader, factory_.associated_group()), kRoutingId, | 415 kRequestId, request, |
422 kRequestId, request, | 416 client.CreateRemoteAssociatedPtrInfo()); |
423 client.CreateRemoteAssociatedPtrInfo(factory_.associated_group())); | |
424 ASSERT_FALSE(client.has_received_response()); | 417 ASSERT_FALSE(client.has_received_response()); |
425 ASSERT_FALSE(client.has_data_downloaded()); | 418 ASSERT_FALSE(client.has_data_downloaded()); |
426 ASSERT_FALSE(client.has_received_completion()); | 419 ASSERT_FALSE(client.has_received_completion()); |
427 | 420 |
428 client.RunUntilResponseReceived(); | 421 client.RunUntilResponseReceived(); |
429 | 422 |
430 net::URLRequest* url_request = | 423 net::URLRequest* url_request = |
431 rdh_.GetURLRequest(GlobalRequestID(kChildId, kRequestId)); | 424 rdh_.GetURLRequest(GlobalRequestID(kChildId, kRequestId)); |
432 ASSERT_TRUE(url_request); | 425 ASSERT_TRUE(url_request); |
433 ResourceRequestInfoImpl* request_info = | 426 ResourceRequestInfoImpl* request_info = |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
474 // Assume the file contents is small enough to be stored in the data pipe. | 467 // Assume the file contents is small enough to be stored in the data pipe. |
475 request.url = net::URLRequestMockHTTPJob::GetMockUrl("gzip-content.svgz"); | 468 request.url = net::URLRequestMockHTTPJob::GetMockUrl("gzip-content.svgz"); |
476 request.method = "GET"; | 469 request.method = "GET"; |
477 // |resource_type| can't be a frame type. It is because when PlzNavigate is | 470 // |resource_type| can't be a frame type. It is because when PlzNavigate is |
478 // enabled, the url scheme of frame type requests from the renderer process | 471 // enabled, the url scheme of frame type requests from the renderer process |
479 // must be blob scheme. | 472 // must be blob scheme. |
480 request.resource_type = RESOURCE_TYPE_XHR; | 473 request.resource_type = RESOURCE_TYPE_XHR; |
481 // Need to set |request_initiator| for non main frame type request. | 474 // Need to set |request_initiator| for non main frame type request. |
482 request.request_initiator = url::Origin(); | 475 request.request_initiator = url::Origin(); |
483 request.report_raw_headers = true; | 476 request.report_raw_headers = true; |
484 factory_->CreateLoaderAndStart( | 477 factory_->CreateLoaderAndStart(mojo::MakeRequest(&loader), kRoutingId, |
485 mojo::MakeRequest(&loader, factory_.associated_group()), kRoutingId, | 478 kRequestId, request, |
486 kRequestId, request, | 479 client.CreateRemoteAssociatedPtrInfo()); |
487 client.CreateRemoteAssociatedPtrInfo(factory_.associated_group())); | |
488 | 480 |
489 client.RunUntilComplete(); | 481 client.RunUntilComplete(); |
490 | 482 |
491 std::string contents; | 483 std::string contents; |
492 while (true) { | 484 while (true) { |
493 char buffer[16]; | 485 char buffer[16]; |
494 uint32_t read_size = sizeof(buffer); | 486 uint32_t read_size = sizeof(buffer); |
495 MojoResult r = mojo::ReadDataRaw(client.response_body(), buffer, &read_size, | 487 MojoResult r = mojo::ReadDataRaw(client.response_body(), buffer, &read_size, |
496 MOJO_READ_DATA_FLAG_NONE); | 488 MOJO_READ_DATA_FLAG_NONE); |
497 if (r == MOJO_RESULT_FAILED_PRECONDITION) | 489 if (r == MOJO_RESULT_FAILED_PRECONDITION) |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
535 // Assume the file contents is small enough to be stored in the data pipe. | 527 // Assume the file contents is small enough to be stored in the data pipe. |
536 request.url = net::URLRequestFailedJob::GetMockHttpUrl(net::ERR_IO_PENDING); | 528 request.url = net::URLRequestFailedJob::GetMockHttpUrl(net::ERR_IO_PENDING); |
537 request.method = "GET"; | 529 request.method = "GET"; |
538 request.is_main_frame = true; | 530 request.is_main_frame = true; |
539 // |resource_type| can't be a frame type. It is because when PlzNavigate is | 531 // |resource_type| can't be a frame type. It is because when PlzNavigate is |
540 // enabled, the url scheme of frame type requests from the renderer process | 532 // enabled, the url scheme of frame type requests from the renderer process |
541 // must be blob scheme. | 533 // must be blob scheme. |
542 request.resource_type = RESOURCE_TYPE_XHR; | 534 request.resource_type = RESOURCE_TYPE_XHR; |
543 // Need to set |request_initiator| for non main frame type request. | 535 // Need to set |request_initiator| for non main frame type request. |
544 request.request_initiator = url::Origin(); | 536 request.request_initiator = url::Origin(); |
545 factory_->CreateLoaderAndStart( | 537 factory_->CreateLoaderAndStart(mojo::MakeRequest(&loader), kRoutingId, |
546 mojo::MakeRequest(&loader, factory_.associated_group()), kRoutingId, | 538 kRequestId, request, |
547 kRequestId, request, | 539 client.CreateRemoteAssociatedPtrInfo()); |
548 client.CreateRemoteAssociatedPtrInfo(factory_.associated_group())); | |
549 | 540 |
550 base::RunLoop().RunUntilIdle(); | 541 base::RunLoop().RunUntilIdle(); |
551 ASSERT_TRUE(rdh_.GetURLRequest(GlobalRequestID(kChildId, kRequestId))); | 542 ASSERT_TRUE(rdh_.GetURLRequest(GlobalRequestID(kChildId, kRequestId))); |
552 ASSERT_FALSE(client.has_received_response()); | 543 ASSERT_FALSE(client.has_received_response()); |
553 ASSERT_FALSE(client.response_body().is_valid()); | 544 ASSERT_FALSE(client.response_body().is_valid()); |
554 ASSERT_FALSE(client.has_received_completion()); | 545 ASSERT_FALSE(client.has_received_completion()); |
555 | 546 |
556 loader = nullptr; | 547 loader = nullptr; |
557 base::RunLoop().RunUntilIdle(); | 548 base::RunLoop().RunUntilIdle(); |
558 ASSERT_FALSE(rdh_.GetURLRequest(GlobalRequestID(kChildId, kRequestId))); | 549 ASSERT_FALSE(rdh_.GetURLRequest(GlobalRequestID(kChildId, kRequestId))); |
559 } | 550 } |
560 | 551 |
561 INSTANTIATE_TEST_CASE_P(URLLoaderFactoryImplTest, | 552 INSTANTIATE_TEST_CASE_P(URLLoaderFactoryImplTest, |
562 URLLoaderFactoryImplTest, | 553 URLLoaderFactoryImplTest, |
563 ::testing::Values(128, 32 * 1024)); | 554 ::testing::Values(128, 32 * 1024)); |
564 | 555 |
565 } // namespace | 556 } // namespace |
566 | 557 |
567 } // namespace content | 558 } // namespace content |
OLD | NEW |