Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 #ifndef CHROME_TEST_BASE_MOJO_TEST_CONNECTOR_H_ | 5 #ifndef CHROME_TEST_BASE_MOJO_TEST_CONNECTOR_H_ |
| 6 #define CHROME_TEST_BASE_MOJO_TEST_CONNECTOR_H_ | 6 #define CHROME_TEST_BASE_MOJO_TEST_CONNECTOR_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 | 9 |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| (...skipping 24 matching lines...) Expand all Loading... | |
| 35 // PrepareForTest() is called from content::TestLauncherDelegate::PreRunTest(). | 35 // PrepareForTest() is called from content::TestLauncherDelegate::PreRunTest(). |
| 36 class MojoTestConnector { | 36 class MojoTestConnector { |
| 37 public: | 37 public: |
| 38 // Switch added to command line of each test. | 38 // Switch added to command line of each test. |
| 39 static const char kTestSwitch[]; | 39 static const char kTestSwitch[]; |
| 40 | 40 |
| 41 // Command line switch added to all apps that are expected to be provided by | 41 // Command line switch added to all apps that are expected to be provided by |
| 42 // browser_tests. | 42 // browser_tests. |
| 43 static const char kMashApp[]; | 43 static const char kMashApp[]; |
| 44 | 44 |
| 45 explicit MojoTestConnector(std::unique_ptr<base::Value> catalog_contents); | 45 // Enumeration of the possible chrome-ash configurations supported by this |
| 46 // test. | |
| 47 enum class Config { | |
| 48 // Aura is backed by mus, but chrome and ash are still in the same process. | |
| 49 MUS, | |
| 50 | |
| 51 // Aura is backed by mus and chrome and ash are in separate processes. In | |
| 52 // this mode chrome code can only use ash code in ash/public/cpp. | |
| 53 MASH, | |
| 54 }; | |
| 55 | |
| 56 explicit MojoTestConnector(std::unique_ptr<base::Value> catalog_contents, | |
|
sky
2017/04/20 20:52:58
remove explicit
jonross
2017/04/21 14:04:21
Done.
| |
| 57 Config config); | |
| 46 ~MojoTestConnector(); | 58 ~MojoTestConnector(); |
| 47 | 59 |
| 48 // Initializes the background thread the ServiceManager runs on. | 60 // Initializes the background thread the ServiceManager runs on. |
| 49 service_manager::mojom::ServiceRequest Init(); | 61 service_manager::mojom::ServiceRequest Init(); |
| 50 | 62 |
| 51 std::unique_ptr<content::TestState> PrepareForTest( | 63 std::unique_ptr<content::TestState> PrepareForTest( |
| 52 base::CommandLine* command_line, | 64 base::CommandLine* command_line, |
| 53 base::TestLauncher::LaunchOptions* test_launch_options); | 65 base::TestLauncher::LaunchOptions* test_launch_options); |
| 54 | 66 |
| 55 private: | 67 private: |
| 56 class ServiceProcessLauncherDelegateImpl; | 68 class ServiceProcessLauncherDelegateImpl; |
| 57 | 69 |
| 70 Config config_; | |
|
sky
2017/04/20 20:52:58
const
jonross
2017/04/21 14:04:21
Done.
| |
| 71 | |
| 58 std::unique_ptr<ServiceProcessLauncherDelegateImpl> | 72 std::unique_ptr<ServiceProcessLauncherDelegateImpl> |
| 59 service_process_launcher_delegate_; | 73 service_process_launcher_delegate_; |
| 60 std::unique_ptr<service_manager::BackgroundServiceManager> | 74 std::unique_ptr<service_manager::BackgroundServiceManager> |
| 61 background_service_manager_; | 75 background_service_manager_; |
| 62 | 76 |
| 63 std::unique_ptr<base::Thread> ipc_thread_; | 77 std::unique_ptr<base::Thread> ipc_thread_; |
| 64 std::unique_ptr<mojo::edk::ScopedIPCSupport> ipc_support_; | 78 std::unique_ptr<mojo::edk::ScopedIPCSupport> ipc_support_; |
| 65 | 79 |
| 66 std::unique_ptr<base::Value> catalog_contents_; | 80 std::unique_ptr<base::Value> catalog_contents_; |
| 67 | 81 |
| 68 DISALLOW_COPY_AND_ASSIGN(MojoTestConnector); | 82 DISALLOW_COPY_AND_ASSIGN(MojoTestConnector); |
| 69 }; | 83 }; |
| 70 | 84 |
| 71 #endif // CHROME_TEST_BASE_MOJO_TEST_CONNECTOR_H_ | 85 #endif // CHROME_TEST_BASE_MOJO_TEST_CONNECTOR_H_ |
| OLD | NEW |