Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(80)

Side by Side Diff: chrome/test/base/mojo_test_connector.h

Issue 2834693002: Mus Browser Tests (Closed)
Patch Set: Address Comments Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « chrome/test/base/mash_browser_tests_main.cc ('k') | chrome/test/base/mojo_test_connector.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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 MojoTestConnector(std::unique_ptr<base::Value> catalog_contents,
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 const Config config_;
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_
OLDNEW
« no previous file with comments | « chrome/test/base/mash_browser_tests_main.cc ('k') | chrome/test/base/mojo_test_connector.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698