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/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
57 // | 57 // |
58 // NOTE: this is not called if --single_process is supplied. | 58 // NOTE: this is not called if --single_process is supplied. |
59 virtual scoped_ptr<TestState> PreRunTest( | 59 virtual scoped_ptr<TestState> PreRunTest( |
60 base::CommandLine* command_line, | 60 base::CommandLine* command_line, |
61 base::TestLauncher::LaunchOptions* test_launch_options); | 61 base::TestLauncher::LaunchOptions* test_launch_options); |
62 | 62 |
63 // Allows a TestLauncherDelegate to adjust the number of |default_jobs| used | 63 // Allows a TestLauncherDelegate to adjust the number of |default_jobs| used |
64 // when --test-launcher-jobs isn't specified on the command-line. | 64 // when --test-launcher-jobs isn't specified on the command-line. |
65 virtual void AdjustDefaultParallelJobs(int* default_jobs) {} | 65 virtual void AdjustDefaultParallelJobs(int* default_jobs) {} |
66 | 66 |
| 67 // Called prior to returning from LaunchTests(). Gives the delegate a chance |
| 68 // to do cleanup before state created by TestLauncher has been destroyed (such |
| 69 // as the AtExitManager). |
| 70 virtual void OnDoneRunningTests(); |
| 71 |
67 protected: | 72 protected: |
68 virtual ~TestLauncherDelegate(); | 73 virtual ~TestLauncherDelegate(); |
69 }; | 74 }; |
70 | 75 |
71 // Launches tests using |launcher_delegate|. |default_jobs| is number | 76 // Launches tests using |launcher_delegate|. |default_jobs| is number |
72 // of test jobs to be run in parallel, unless overridden from the command line. | 77 // of test jobs to be run in parallel, unless overridden from the command line. |
73 // Returns exit code. | 78 // Returns exit code. |
74 int LaunchTests(TestLauncherDelegate* launcher_delegate, | 79 int LaunchTests(TestLauncherDelegate* launcher_delegate, |
75 int default_jobs, | 80 int default_jobs, |
76 int argc, | 81 int argc, |
77 char** argv) WARN_UNUSED_RESULT; | 82 char** argv) WARN_UNUSED_RESULT; |
78 | 83 |
79 TestLauncherDelegate* GetCurrentTestLauncherDelegate(); | 84 TestLauncherDelegate* GetCurrentTestLauncherDelegate(); |
80 ContentMainParams* GetContentMainParams(); | 85 ContentMainParams* GetContentMainParams(); |
81 | 86 |
82 } // namespace content | 87 } // namespace content |
83 | 88 |
84 #endif // CONTENT_PUBLIC_TEST_TEST_LAUNCHER_H_ | 89 #endif // CONTENT_PUBLIC_TEST_TEST_LAUNCHER_H_ |
OLD | NEW |