OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |