OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 CONTENT_PUBLIC_TEST_TEST_LAUNCHER_H_ | 5 #ifndef CONTENT_PUBLIC_TEST_TEST_LAUNCHER_H_ |
6 #define CONTENT_PUBLIC_TEST_TEST_LAUNCHER_H_ | 6 #define CONTENT_PUBLIC_TEST_TEST_LAUNCHER_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
11 #include "base/compiler_specific.h" | 11 #include "base/compiler_specific.h" |
12 | 12 |
13 class CommandLine; | 13 class CommandLine; |
14 | 14 |
15 namespace base { | 15 namespace base { |
16 class RunLoop; | 16 class RunLoop; |
17 } | 17 } |
18 | 18 |
19 namespace test_launcher { | 19 namespace test_launcher { |
20 | 20 |
21 extern const char kEmptyTestName[]; | 21 extern const char kEmptyTestName[]; |
22 extern const char kGTestFilterFlag[]; | 22 extern const char kGTestFilterFlag[]; |
23 extern const char kGTestHelpFlag[]; | 23 extern const char kGTestHelpFlag[]; |
24 extern const char kGTestListTestsFlag[]; | 24 extern const char kGTestListTestsFlag[]; |
25 extern const char kGTestRepeatFlag[]; | 25 extern const char kGTestRepeatFlag[]; |
26 extern const char kGTestRunDisabledTestsFlag[]; | 26 extern const char kGTestRunDisabledTestsFlag[]; |
27 extern const char kGTestOutputFlag[]; | 27 extern const char kGTestOutputFlag[]; |
28 extern const char kSingleProcessTestsFlag[]; | 28 extern const char kSingleProcessTestsFlag[]; |
29 extern const char kSingleProcessTestsAndChromeFlag[]; | 29 extern const char kSingleProcessTestsAndChromeFlag[]; |
| 30 extern const char kRunManualTestsFlag[]; |
30 extern const char kHelpFlag[]; | 31 extern const char kHelpFlag[]; |
31 | 32 |
32 // Flag that causes only the kEmptyTestName test to be run. | 33 // Flag that causes only the kEmptyTestName test to be run. |
33 extern const char kWarmupFlag[]; | 34 extern const char kWarmupFlag[]; |
34 | 35 |
35 class TestLauncherDelegate { | 36 class TestLauncherDelegate { |
36 public: | 37 public: |
37 virtual std::string GetEmptyTestName() = 0; | 38 virtual std::string GetEmptyTestName() = 0; |
38 virtual bool Run(int argc, char** argv, int* return_code) = 0; | 39 virtual bool Run(int argc, char** argv, int* return_code) = 0; |
39 virtual int RunTestSuite(int argc, char** argv) = 0; | 40 virtual int RunTestSuite(int argc, char** argv) = 0; |
40 virtual bool AdjustChildProcessCommandLine(CommandLine* command_line) = 0; | 41 virtual bool AdjustChildProcessCommandLine(CommandLine* command_line) = 0; |
41 virtual void PreRunMessageLoop(base::RunLoop* run_loop) {} | 42 virtual void PreRunMessageLoop(base::RunLoop* run_loop) {} |
42 virtual void PostRunMessageLoop() {} | 43 virtual void PostRunMessageLoop() {} |
43 | 44 |
44 protected: | 45 protected: |
45 virtual ~TestLauncherDelegate(); | 46 virtual ~TestLauncherDelegate(); |
46 }; | 47 }; |
47 | 48 |
48 int LaunchTests(TestLauncherDelegate* launcher_delegate, | 49 int LaunchTests(TestLauncherDelegate* launcher_delegate, |
49 int argc, | 50 int argc, |
50 char** argv) WARN_UNUSED_RESULT; | 51 char** argv) WARN_UNUSED_RESULT; |
51 | 52 |
52 TestLauncherDelegate* GetCurrentTestLauncherDelegate(); | 53 TestLauncherDelegate* GetCurrentTestLauncherDelegate(); |
53 | 54 |
54 } // namespace test_launcher | 55 } // namespace test_launcher |
55 | 56 |
56 #endif // CONTENT_PUBLIC_TEST_TEST_LAUNCHER_H_ | 57 #endif // CONTENT_PUBLIC_TEST_TEST_LAUNCHER_H_ |
OLD | NEW |