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

Side by Side Diff: mojo/public/cpp/application/lib/application_test_base.cc

Issue 1118843003: Remove some InterfacePtr<> methods which directly deal with message pipe handles. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 years, 7 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "mojo/public/cpp/application/application_test_base.h" 5 #include "mojo/public/cpp/application/application_test_base.h"
6 6
7 #include "mojo/public/cpp/application/application_impl.h" 7 #include "mojo/public/cpp/application/application_impl.h"
8 #include "mojo/public/cpp/bindings/binding.h" 8 #include "mojo/public/cpp/bindings/binding.h"
9 #include "mojo/public/cpp/environment/environment.h" 9 #include "mojo/public/cpp/environment/environment.h"
10 #include "mojo/public/cpp/system/message_pipe.h" 10 #include "mojo/public/cpp/system/message_pipe.h"
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 testing::InitGoogleTest(&argc, const_cast<char**>(&(argv[0]))); 108 testing::InitGoogleTest(&argc, const_cast<char**>(&(argv[0])));
109 InitializeArgs(argc, argv); 109 InitializeArgs(argc, argv);
110 110
111 Environment::DestroyDefaultRunLoop(); 111 Environment::DestroyDefaultRunLoop();
112 } 112 }
113 113
114 int result = RUN_ALL_TESTS(); 114 int result = RUN_ALL_TESTS();
115 115
116 // Shut down our message pipes before exiting. 116 // Shut down our message pipes before exiting.
117 (void)g_application_request.PassMessagePipe(); 117 (void)g_application_request.PassMessagePipe();
118 (void)g_shell.PassMessagePipe(); 118 (void)g_shell.PassInterface();
119 119
120 return (result == 0) ? MOJO_RESULT_OK : MOJO_RESULT_UNKNOWN; 120 return (result == 0) ? MOJO_RESULT_OK : MOJO_RESULT_UNKNOWN;
121 } 121 }
122 122
123 ApplicationTestBase::ApplicationTestBase() : application_impl_(nullptr) { 123 ApplicationTestBase::ApplicationTestBase() : application_impl_(nullptr) {
124 } 124 }
125 125
126 ApplicationTestBase::~ApplicationTestBase() { 126 ApplicationTestBase::~ApplicationTestBase() {
127 } 127 }
128 128
(...skipping 27 matching lines...) Expand all
156 if (ShouldCreateDefaultRunLoop()) 156 if (ShouldCreateDefaultRunLoop())
157 Environment::DestroyDefaultRunLoop(); 157 Environment::DestroyDefaultRunLoop();
158 } 158 }
159 159
160 bool ApplicationTestBase::ShouldCreateDefaultRunLoop() { 160 bool ApplicationTestBase::ShouldCreateDefaultRunLoop() {
161 return true; 161 return true;
162 } 162 }
163 163
164 } // namespace test 164 } // namespace test
165 } // namespace mojo 165 } // namespace mojo
OLDNEW
« no previous file with comments | « mojo/public/cpp/application/lib/application_impl.cc ('k') | mojo/public/cpp/bindings/interface_ptr.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698