Chromium Code Reviews| 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 <utility> | 5 #include <utility> |
| 6 | 6 |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/logging.h" | 8 #include "base/logging.h" |
| 9 #include "base/strings/utf_string_conversions.h" | 9 #include "base/strings/utf_string_conversions.h" |
| 10 #include "mojo/public/cpp/bindings/binding.h" | 10 #include "mojo/public/cpp/bindings/binding.h" |
| (...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 154 CHECK(g_shell); | 154 CHECK(g_shell); |
| 155 | 155 |
| 156 // New applications are constructed for each test to avoid persisting state. | 156 // New applications are constructed for each test to avoid persisting state. |
| 157 test_helper_.reset(new TestHelper(GetShellClient())); | 157 test_helper_.reset(new TestHelper(GetShellClient())); |
| 158 } | 158 } |
| 159 | 159 |
| 160 void ApplicationTestBase::TearDown() { | 160 void ApplicationTestBase::TearDown() { |
| 161 CHECK(!g_shell_client_request.is_pending()); | 161 CHECK(!g_shell_client_request.is_pending()); |
| 162 CHECK(!g_shell); | 162 CHECK(!g_shell); |
| 163 | 163 |
| 164 test_helper_.reset(); | |
| 165 | |
| 166 if (ShouldCreateDefaultRunLoop()) | 164 if (ShouldCreateDefaultRunLoop()) |
| 167 Environment::DestroyDefaultRunLoop(); | 165 Environment::DestroyDefaultRunLoop(); |
|
msw
2016/02/23 18:02:42
Does the order of closing the connection and destr
msw
2016/02/23 18:03:44
Sorry, ignore this old comment.
xhwang
2016/02/23 18:05:39
Actually it's a good question, and I don't know en
| |
| 168 } | 166 } |
| 169 | 167 |
| 170 bool ApplicationTestBase::ShouldCreateDefaultRunLoop() { | 168 bool ApplicationTestBase::ShouldCreateDefaultRunLoop() { |
| 171 return true; | 169 return true; |
| 172 } | 170 } |
| 173 | 171 |
| 174 } // namespace test | 172 } // namespace test |
| 175 } // namespace mojo | 173 } // namespace mojo |
| OLD | NEW |