| 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/mojo_async_resource_handler.h" | 5 #include "content/browser/loader/mojo_async_resource_handler.h" |
| 6 | 6 |
| 7 #include <string.h> | 7 #include <string.h> |
| 8 | 8 |
| 9 #include <utility> | 9 #include <utility> |
| 10 | 10 |
| (...skipping 323 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 334 true, // is_main_frame | 334 true, // is_main_frame |
| 335 false, // parent_is_main_frame | 335 false, // parent_is_main_frame |
| 336 false, // allow_download | 336 false, // allow_download |
| 337 true, // is_async | 337 true, // is_async |
| 338 false // is_using_lofi | 338 false // is_using_lofi |
| 339 ); | 339 ); |
| 340 | 340 |
| 341 ResourceRequest request; | 341 ResourceRequest request; |
| 342 base::WeakPtr<mojo::StrongBinding<mojom::URLLoaderFactory>> weak_binding = | 342 base::WeakPtr<mojo::StrongBinding<mojom::URLLoaderFactory>> weak_binding = |
| 343 mojo::MakeStrongBinding(base::MakeUnique<TestURLLoaderFactory>(), | 343 mojo::MakeStrongBinding(base::MakeUnique<TestURLLoaderFactory>(), |
| 344 mojo::GetProxy(&url_loader_factory_)); | 344 mojo::MakeRequest(&url_loader_factory_)); |
| 345 | 345 |
| 346 url_loader_factory_->CreateLoaderAndStart( | 346 url_loader_factory_->CreateLoaderAndStart( |
| 347 mojo::GetProxy(&url_loader_proxy_, | 347 mojo::MakeRequest(&url_loader_proxy_, |
| 348 url_loader_factory_.associated_group()), | 348 url_loader_factory_.associated_group()), |
| 349 0, 0, request, url_loader_client_.CreateRemoteAssociatedPtrInfo( | 349 0, 0, request, url_loader_client_.CreateRemoteAssociatedPtrInfo( |
| 350 url_loader_factory_.associated_group())); | 350 url_loader_factory_.associated_group())); |
| 351 | 351 |
| 352 url_loader_factory_.FlushForTesting(); | 352 url_loader_factory_.FlushForTesting(); |
| 353 DCHECK(weak_binding); | 353 DCHECK(weak_binding); |
| 354 TestURLLoaderFactory* factory_impl = | 354 TestURLLoaderFactory* factory_impl = |
| 355 static_cast<TestURLLoaderFactory*>(weak_binding->impl()); | 355 static_cast<TestURLLoaderFactory*>(weak_binding->impl()); |
| 356 | 356 |
| 357 mojom::URLLoaderClientAssociatedPtr client_ptr; | 357 mojom::URLLoaderClientAssociatedPtr client_ptr; |
| 358 client_ptr.Bind(factory_impl->PassClientPtrInfo()); | 358 client_ptr.Bind(factory_impl->PassClientPtrInfo()); |
| (...skipping 911 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1270 } | 1270 } |
| 1271 } | 1271 } |
| 1272 EXPECT_EQ("B", body); | 1272 EXPECT_EQ("B", body); |
| 1273 } | 1273 } |
| 1274 | 1274 |
| 1275 INSTANTIATE_TEST_CASE_P(MojoAsyncResourceHandlerWithAllocationSizeTest, | 1275 INSTANTIATE_TEST_CASE_P(MojoAsyncResourceHandlerWithAllocationSizeTest, |
| 1276 MojoAsyncResourceHandlerWithAllocationSizeTest, | 1276 MojoAsyncResourceHandlerWithAllocationSizeTest, |
| 1277 ::testing::Values(8, 32 * 2014)); | 1277 ::testing::Values(8, 32 * 2014)); |
| 1278 } // namespace | 1278 } // namespace |
| 1279 } // namespace content | 1279 } // namespace content |
| OLD | NEW |