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

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

Issue 1806353003: Adds option to run browser tests in mash (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: cleanup Created 4 years, 9 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
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef CHROME_TEST_BASE_MOJO_TEST_CONNECTOR_H_
6 #define CHROME_TEST_BASE_MOJO_TEST_CONNECTOR_H_
7
8 #include "base/macros.h"
9 #include "base/memory/scoped_ptr.h"
10 #include "base/process/process_handle.h"
11 #include "base/test/launcher/test_launcher.h"
12 #include "mojo/shell/background/background_shell.h"
13 #include "mojo/shell/public/interfaces/shell_client.mojom.h"
14
15 namespace base {
16 class CommandLine;
17 }
18
19 namespace content {
20 class TestState;
21 }
22
23 namespace mojo {
24 class ShellClient;
25 class ShellConnection;
26 }
27
28 // MojoTestConnector in responsible for providing the necessary wiring for
29 // test processes to get a mojo channel passed to them. To use this class
30 // call PrepareForTest() prior to launching each test. It is expected
31 // PrepareForTest() is called from content::TestLauncherDelegate::PreRunTest().
32 class MojoTestConnector {
33 public:
34 // Switch added to command line of each test.
35 static const char kTestSwitch[];
36
37 MojoTestConnector();
38 ~MojoTestConnector();
39
40 // Initializes the background thread the Shell runs on.
41 mojo::shell::mojom::ShellClientRequest Init();
42
43 scoped_ptr<content::TestState> PrepareForTest(
44 base::CommandLine* command_line,
45 base::TestLauncher::LaunchOptions* test_launch_options);
46
47 private:
48 mojo::shell::BackgroundShell background_shell_;
49
50 DISALLOW_COPY_AND_ASSIGN(MojoTestConnector);
51 };
52
53 #endif // CHROME_TEST_BASE_MOJO_TEST_CONNECTOR_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698