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/application/application_test_base_chromium.h" | 5 #include "mojo/application/application_test_base_chromium.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/strings/utf_string_conversions.h" | 8 #include "base/strings/utf_string_conversions.h" |
9 #include "mojo/public/cpp/application/application_impl.h" | 9 #include "mojo/public/cpp/application/application_impl.h" |
10 #include "mojo/public/cpp/bindings/binding.h" | 10 #include "mojo/public/cpp/bindings/binding.h" |
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
92 | 92 |
93 testing::InitGoogleTest(&argc, const_cast<char**>(&(argv[0]))); | 93 testing::InitGoogleTest(&argc, const_cast<char**>(&(argv[0]))); |
94 | 94 |
95 Environment::DestroyDefaultRunLoop(); | 95 Environment::DestroyDefaultRunLoop(); |
96 } | 96 } |
97 | 97 |
98 int result = RUN_ALL_TESTS(); | 98 int result = RUN_ALL_TESTS(); |
99 | 99 |
100 // Shut down our message pipes before exiting. | 100 // Shut down our message pipes before exiting. |
101 (void)g_application_request.PassMessagePipe(); | 101 (void)g_application_request.PassMessagePipe(); |
102 (void)g_shell.PassMessagePipe(); | 102 (void)g_shell.PassInterface(); |
103 | 103 |
104 return (result == 0) ? MOJO_RESULT_OK : MOJO_RESULT_UNKNOWN; | 104 return (result == 0) ? MOJO_RESULT_OK : MOJO_RESULT_UNKNOWN; |
105 } | 105 } |
106 | 106 |
107 ApplicationTestBase::ApplicationTestBase() : application_impl_(nullptr) { | 107 ApplicationTestBase::ApplicationTestBase() : application_impl_(nullptr) { |
108 } | 108 } |
109 | 109 |
110 ApplicationTestBase::~ApplicationTestBase() { | 110 ApplicationTestBase::~ApplicationTestBase() { |
111 } | 111 } |
112 | 112 |
(...skipping 28 matching lines...) Expand all Loading... |
141 if (ShouldCreateDefaultRunLoop()) | 141 if (ShouldCreateDefaultRunLoop()) |
142 Environment::DestroyDefaultRunLoop(); | 142 Environment::DestroyDefaultRunLoop(); |
143 } | 143 } |
144 | 144 |
145 bool ApplicationTestBase::ShouldCreateDefaultRunLoop() { | 145 bool ApplicationTestBase::ShouldCreateDefaultRunLoop() { |
146 return true; | 146 return true; |
147 } | 147 } |
148 | 148 |
149 } // namespace test | 149 } // namespace test |
150 } // namespace mojo | 150 } // namespace mojo |
OLD | NEW |