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

Unified Diff: mojo/shell/shell_test_base.h

Issue 491443005: Get rid of KeepAlive. Quit shell when all urls run directly by Context are closed. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Bring back ConnectToServiceViaNetwork Created 6 years, 4 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 side-by-side diff with in-line comments
Download patch
Index: mojo/shell/shell_test_base.h
diff --git a/mojo/shell/shell_test_base.h b/mojo/shell/shell_test_base.h
index 7c61844431c5a9d9fc1ca658d790f56d2d462bbc..98e744c1870406933898bc9d4a35c5d44423bfb4 100644
--- a/mojo/shell/shell_test_base.h
+++ b/mojo/shell/shell_test_base.h
@@ -43,6 +43,19 @@ class ShellTestBase : public testing::Test {
const GURL& application_url,
const std::string& service_name);
+ template <typename Interface>
+ void ConnectToService(const GURL& application_url,
+ InterfacePtr<Interface>* ptr) {
+ ptr->Bind(ConnectToService(application_url, Interface::Name_).Pass());
+ }
+
+ template <typename Interface>
+ void ConnectToServiceViaNetwork(const GURL& application_url,
+ InterfacePtr<Interface>* ptr) {
+ ptr->Bind(
+ ConnectToServiceViaNetwork(application_url, Interface::Name_).Pass());
+ }
+
base::MessageLoop* message_loop() { return &message_loop_; }
Context* shell_context() { return &shell_context_; }

Powered by Google App Engine
This is Rietveld 408576698