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" |
11 #include "mojo/public/cpp/environment/environment.h" | 11 #include "mojo/public/cpp/environment/environment.h" |
12 #include "mojo/public/cpp/system/message_pipe.h" | 12 #include "mojo/public/cpp/system/message_pipe.h" |
13 #include "mojo/shell/public/cpp/application_test_base.h" | 13 #include "mojo/shell/public/cpp/application_test_base.h" |
14 #include "mojo/shell/public/cpp/shell_connection.h" | 14 #include "mojo/shell/public/cpp/shell_connection.h" |
15 #include "mojo/shell/public/interfaces/shell_client.mojom.h" | 15 #include "mojo/shell/public/interfaces/shell_client.mojom.h" |
16 | 16 |
17 namespace mojo { | 17 namespace mojo { |
18 namespace test { | 18 namespace test { |
19 | 19 |
20 namespace { | 20 namespace { |
21 // Share the application URL with multiple application tests. | 21 // Share the application URL with multiple application tests. |
22 String g_url; | 22 String g_url; |
23 uint32_t g_id = shell::mojom::Shell::kInvalidApplicationID; | 23 uint32_t g_id = shell::mojom::Connector::kInvalidApplicationID; |
24 uint32_t g_user_id = shell::mojom::Shell::kUserRoot; | 24 uint32_t g_user_id = shell::mojom::Connector::kUserRoot; |
25 | 25 |
26 // ShellClient request handle passed from the shell in MojoMain, stored in | 26 // ShellClient request handle passed from the shell in MojoMain, stored in |
27 // between SetUp()/TearDown() so we can (re-)intialize new ShellConnections. | 27 // between SetUp()/TearDown() so we can (re-)intialize new ShellConnections. |
28 InterfaceRequest<shell::mojom::ShellClient> g_shell_client_request; | 28 InterfaceRequest<shell::mojom::ShellClient> g_shell_client_request; |
29 | 29 |
30 // Shell pointer passed in the initial mojo.ShellClient.Initialize() call, | 30 // Shell pointer passed in the initial mojo.ShellClient.Initialize() call, |
31 // stored in between initial setup and the first test and between SetUp/TearDown | 31 // stored in between initial setup and the first test and between SetUp/TearDown |
32 // calls so we can (re-)initialize new ShellConnections. | 32 // calls so we can (re-)initialize new ShellConnections. |
33 shell::mojom::ShellPtr g_shell; | 33 shell::mojom::ShellPtr g_shell; |
34 | 34 |
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
170 if (ShouldCreateDefaultRunLoop()) | 170 if (ShouldCreateDefaultRunLoop()) |
171 Environment::DestroyDefaultRunLoop(); | 171 Environment::DestroyDefaultRunLoop(); |
172 } | 172 } |
173 | 173 |
174 bool ApplicationTestBase::ShouldCreateDefaultRunLoop() { | 174 bool ApplicationTestBase::ShouldCreateDefaultRunLoop() { |
175 return true; | 175 return true; |
176 } | 176 } |
177 | 177 |
178 } // namespace test | 178 } // namespace test |
179 } // namespace mojo | 179 } // namespace mojo |
OLD | NEW |