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

Side by Side Diff: content/browser/loader/mojo_async_resource_handler_unittest.cc

Issue 2695333002: Mojo C++ bindings: remove usage of AssociatedGroup from content/ (Closed)
Patch Set: . Created 3 years, 10 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
OLDNEW
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 #include <vector> 10 #include <vector>
(...skipping 353 matching lines...) Expand 10 before | Expand all | Expand 10 after
364 true, // is_async 364 true, // is_async
365 PREVIEWS_OFF // previews_state 365 PREVIEWS_OFF // previews_state
366 ); 366 );
367 367
368 ResourceRequest request; 368 ResourceRequest request;
369 base::WeakPtr<mojo::StrongBinding<mojom::URLLoaderFactory>> weak_binding = 369 base::WeakPtr<mojo::StrongBinding<mojom::URLLoaderFactory>> weak_binding =
370 mojo::MakeStrongBinding(base::MakeUnique<TestURLLoaderFactory>(), 370 mojo::MakeStrongBinding(base::MakeUnique<TestURLLoaderFactory>(),
371 mojo::MakeRequest(&url_loader_factory_)); 371 mojo::MakeRequest(&url_loader_factory_));
372 372
373 url_loader_factory_->CreateLoaderAndStart( 373 url_loader_factory_->CreateLoaderAndStart(
374 mojo::MakeRequest(&url_loader_proxy_, 374 mojo::MakeRequest(&url_loader_proxy_), kRouteId, kRequestId, request,
375 url_loader_factory_.associated_group()), 375 url_loader_client_.CreateRemoteAssociatedPtrInfo());
376 kRouteId, kRequestId, request,
377 url_loader_client_.CreateRemoteAssociatedPtrInfo(
378 url_loader_factory_.associated_group()));
379 376
380 url_loader_factory_.FlushForTesting(); 377 url_loader_factory_.FlushForTesting();
381 DCHECK(weak_binding); 378 DCHECK(weak_binding);
382 TestURLLoaderFactory* factory_impl = 379 TestURLLoaderFactory* factory_impl =
383 static_cast<TestURLLoaderFactory*>(weak_binding->impl()); 380 static_cast<TestURLLoaderFactory*>(weak_binding->impl());
384 381
385 mojom::URLLoaderClientAssociatedPtr client_ptr; 382 mojom::URLLoaderClientAssociatedPtr client_ptr;
386 client_ptr.Bind(factory_impl->PassClientPtrInfo()); 383 client_ptr.Bind(factory_impl->PassClientPtrInfo());
387 handler_.reset(new MojoAsyncResourceHandlerWithStubOperations( 384 handler_.reset(new MojoAsyncResourceHandlerWithStubOperations(
388 request_.get(), &rdh_, factory_impl->PassLoaderRequest(), 385 request_.get(), &rdh_, factory_impl->PassLoaderRequest(),
(...skipping 894 matching lines...) Expand 10 before | Expand all | Expand 10 after
1283 } 1280 }
1284 } 1281 }
1285 EXPECT_EQ("B", body); 1282 EXPECT_EQ("B", body);
1286 } 1283 }
1287 1284
1288 INSTANTIATE_TEST_CASE_P(MojoAsyncResourceHandlerWithAllocationSizeTest, 1285 INSTANTIATE_TEST_CASE_P(MojoAsyncResourceHandlerWithAllocationSizeTest,
1289 MojoAsyncResourceHandlerWithAllocationSizeTest, 1286 MojoAsyncResourceHandlerWithAllocationSizeTest,
1290 ::testing::Values(8, 32 * 2014)); 1287 ::testing::Values(8, 32 * 2014));
1291 } // namespace 1288 } // namespace
1292 } // namespace content 1289 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/loader/mojo_async_resource_handler.cc ('k') | content/browser/loader/test_url_loader_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698