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" |
(...skipping 10 matching lines...) Expand all Loading... |
21 class ContentMainDelegate; | 21 class ContentMainDelegate; |
22 | 22 |
23 extern const char kEmptyTestName[]; | 23 extern const char kEmptyTestName[]; |
24 extern const char kGTestFilterFlag[]; | 24 extern const char kGTestFilterFlag[]; |
25 extern const char kGTestHelpFlag[]; | 25 extern const char kGTestHelpFlag[]; |
26 extern const char kGTestListTestsFlag[]; | 26 extern const char kGTestListTestsFlag[]; |
27 extern const char kGTestRepeatFlag[]; | 27 extern const char kGTestRepeatFlag[]; |
28 extern const char kGTestRunDisabledTestsFlag[]; | 28 extern const char kGTestRunDisabledTestsFlag[]; |
29 extern const char kGTestOutputFlag[]; | 29 extern const char kGTestOutputFlag[]; |
30 extern const char kHelpFlag[]; | 30 extern const char kHelpFlag[]; |
31 extern const char kLaunchAsBrowser[]; | |
32 extern const char kRunManualTestsFlag[]; | 31 extern const char kRunManualTestsFlag[]; |
33 extern const char kSingleProcessTestsFlag[]; | 32 extern const char kSingleProcessTestsFlag[]; |
34 | 33 |
35 // Flag that causes only the kEmptyTestName test to be run. | 34 // Flag that causes only the kEmptyTestName test to be run. |
36 extern const char kWarmupFlag[]; | 35 extern const char kWarmupFlag[]; |
37 | 36 |
38 class TestLauncherDelegate { | 37 class TestLauncherDelegate { |
39 public: | 38 public: |
40 virtual std::string GetEmptyTestName() = 0; | 39 virtual std::string GetEmptyTestName() = 0; |
41 virtual int RunTestSuite(int argc, char** argv) = 0; | 40 virtual int RunTestSuite(int argc, char** argv) = 0; |
42 virtual bool AdjustChildProcessCommandLine(CommandLine* command_line, | 41 virtual bool AdjustChildProcessCommandLine(CommandLine* command_line, |
43 const FilePath& temp_data_dir) = 0; | 42 const FilePath& temp_data_dir) = 0; |
44 virtual void PreRunMessageLoop(base::RunLoop* run_loop) {} | 43 virtual void PreRunMessageLoop(base::RunLoop* run_loop) {} |
45 virtual void PostRunMessageLoop() {} | 44 virtual void PostRunMessageLoop() {} |
46 virtual ContentMainDelegate* CreateContentMainDelegate() = 0; | 45 virtual ContentMainDelegate* CreateContentMainDelegate() = 0; |
47 | 46 |
48 protected: | 47 protected: |
49 virtual ~TestLauncherDelegate(); | 48 virtual ~TestLauncherDelegate(); |
50 }; | 49 }; |
51 | 50 |
52 int LaunchTests(TestLauncherDelegate* launcher_delegate, | 51 int LaunchTests(TestLauncherDelegate* launcher_delegate, |
53 int argc, | 52 int argc, |
54 char** argv) WARN_UNUSED_RESULT; | 53 char** argv) WARN_UNUSED_RESULT; |
55 | 54 |
56 TestLauncherDelegate* GetCurrentTestLauncherDelegate(); | 55 TestLauncherDelegate* GetCurrentTestLauncherDelegate(); |
57 | 56 |
58 } // namespace content | 57 } // namespace content |
59 | 58 |
60 #endif // CONTENT_PUBLIC_TEST_TEST_LAUNCHER_H_ | 59 #endif // CONTENT_PUBLIC_TEST_TEST_LAUNCHER_H_ |
OLD | NEW |