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 21 matching lines...) Expand all Loading... |
32 class TestLauncherDelegate { | 32 class TestLauncherDelegate { |
33 public: | 33 public: |
34 virtual int RunTestSuite(int argc, char** argv) = 0; | 34 virtual int RunTestSuite(int argc, char** argv) = 0; |
35 virtual bool AdjustChildProcessCommandLine( | 35 virtual bool AdjustChildProcessCommandLine( |
36 CommandLine* command_line, | 36 CommandLine* command_line, |
37 const base::FilePath& temp_data_dir) = 0; | 37 const base::FilePath& temp_data_dir) = 0; |
38 virtual void PreRunMessageLoop(base::RunLoop* run_loop) {} | 38 virtual void PreRunMessageLoop(base::RunLoop* run_loop) {} |
39 virtual void PostRunMessageLoop() {} | 39 virtual void PostRunMessageLoop() {} |
40 virtual ContentMainDelegate* CreateContentMainDelegate() = 0; | 40 virtual ContentMainDelegate* CreateContentMainDelegate() = 0; |
41 | 41 |
| 42 // Allows a TestLauncherDelegate to adjust the number of |default_jobs| used |
| 43 // when --test-launcher-jobs isn't specified on the command-line. |
| 44 virtual void AdjustDefaultParallelJobs(int* default_jobs) {} |
| 45 |
42 protected: | 46 protected: |
43 virtual ~TestLauncherDelegate(); | 47 virtual ~TestLauncherDelegate(); |
44 }; | 48 }; |
45 | 49 |
46 // Launches tests using |launcher_delegate|. |default_jobs| is number | 50 // Launches tests using |launcher_delegate|. |default_jobs| is number |
47 // of test jobs to be run in parallel, unless overridden from the command line. | 51 // of test jobs to be run in parallel, unless overridden from the command line. |
48 // Returns exit code. | 52 // Returns exit code. |
49 int LaunchTests(TestLauncherDelegate* launcher_delegate, | 53 int LaunchTests(TestLauncherDelegate* launcher_delegate, |
50 int default_jobs, | 54 int default_jobs, |
51 int argc, | 55 int argc, |
52 char** argv) WARN_UNUSED_RESULT; | 56 char** argv) WARN_UNUSED_RESULT; |
53 | 57 |
54 TestLauncherDelegate* GetCurrentTestLauncherDelegate(); | 58 TestLauncherDelegate* GetCurrentTestLauncherDelegate(); |
55 | 59 |
56 } // namespace content | 60 } // namespace content |
57 | 61 |
58 #endif // CONTENT_PUBLIC_TEST_TEST_LAUNCHER_H_ | 62 #endif // CONTENT_PUBLIC_TEST_TEST_LAUNCHER_H_ |
OLD | NEW |