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

Side by Side Diff: mojo/shell/capability_filter_unittest.cc

Issue 1311353005: Adds a way to determine id of content handler that created app (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: nuke comment Created 5 years, 3 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 | « mojo/shell/application_manager_unittest.cc ('k') | mojo/shell/content_handler_connection.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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 "base/at_exit.h" 5 #include "base/at_exit.h"
6 #include "base/bind.h" 6 #include "base/bind.h"
7 #include "base/macros.h" 7 #include "base/macros.h"
8 #include "base/memory/scoped_vector.h" 8 #include "base/memory/scoped_vector.h"
9 #include "base/message_loop/message_loop.h" 9 #include "base/message_loop/message_loop.h"
10 #include "base/stl_util.h" 10 #include "base/stl_util.h"
(...skipping 334 matching lines...) Expand 10 before | Expand all | Expand 10 after
345 // because we don't allow the test application to connect to test:validator. 345 // because we don't allow the test application to connect to test:validator.
346 // Adding it to the CapabilityFilter would interfere with the test. 346 // Adding it to the CapabilityFilter would interfere with the test.
347 ServiceProviderPtr exposed_services; 347 ServiceProviderPtr exposed_services;
348 (new ServiceProviderImpl(GetProxy(&exposed_services)))-> 348 (new ServiceProviderImpl(GetProxy(&exposed_services)))->
349 AddService<Validator>(validator_); 349 AddService<Validator>(validator_);
350 URLRequestPtr request(URLRequest::New()); 350 URLRequestPtr request(URLRequest::New());
351 request->url = String::From(url); 351 request->url = String::From(url);
352 application_manager_->ConnectToApplication( 352 application_manager_->ConnectToApplication(
353 nullptr, request.Pass(), std::string(), GURL(), GetProxy(&services), 353 nullptr, request.Pass(), std::string(), GURL(), GetProxy(&services),
354 exposed_services.Pass(), filter, 354 exposed_services.Pass(), filter,
355 base::MessageLoop::QuitWhenIdleClosure()); 355 base::MessageLoop::QuitWhenIdleClosure(), EmptyConnectCallback());
356 } 356 }
357 357
358 void InitValidator(const std::set<std::string>& expectations) { 358 void InitValidator(const std::set<std::string>& expectations) {
359 validator_ = new ConnectionValidator(expectations, &loop_); 359 validator_ = new ConnectionValidator(expectations, &loop_);
360 application_manager()->SetLoaderForURL(make_scoped_ptr(validator_), 360 application_manager()->SetLoaderForURL(make_scoped_ptr(validator_),
361 GURL("test:validator")); 361 GURL("test:validator"));
362 } 362 }
363 363
364 template <class T> 364 template <class T>
365 void CreateLoader(const std::string& url) { 365 void CreateLoader(const std::string& url) {
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after
545 RunTest(); 545 RunTest();
546 } 546 }
547 547
548 TEST_F(CapabilityFilter_WildcardsTest, ContentHandler) { 548 TEST_F(CapabilityFilter_WildcardsTest, ContentHandler) {
549 RunContentHandlerTest(); 549 RunContentHandlerTest();
550 } 550 }
551 551
552 } // namespace 552 } // namespace
553 } // namespace shell 553 } // namespace shell
554 } // namespace mojo 554 } // namespace mojo
OLDNEW
« no previous file with comments | « mojo/shell/application_manager_unittest.cc ('k') | mojo/shell/content_handler_connection.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698