Chromium Code Reviews| 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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 43 class TestLauncherDelegate { | 43 class TestLauncherDelegate { |
| 44 public: | 44 public: |
| 45 virtual int RunTestSuite(int argc, char** argv) = 0; | 45 virtual int RunTestSuite(int argc, char** argv) = 0; |
| 46 virtual bool AdjustChildProcessCommandLine( | 46 virtual bool AdjustChildProcessCommandLine( |
| 47 base::CommandLine* command_line, | 47 base::CommandLine* command_line, |
| 48 const base::FilePath& temp_data_dir) = 0; | 48 const base::FilePath& temp_data_dir) = 0; |
| 49 virtual void PreRunMessageLoop(base::RunLoop* run_loop) {} | 49 virtual void PreRunMessageLoop(base::RunLoop* run_loop) {} |
| 50 virtual void PostRunMessageLoop() {} | 50 virtual void PostRunMessageLoop() {} |
| 51 virtual ContentMainDelegate* CreateContentMainDelegate() = 0; | 51 virtual ContentMainDelegate* CreateContentMainDelegate() = 0; |
| 52 | 52 |
| 53 // Called prior to returning from LaunchTests(). Gives the delegate a chance | |
| 54 // to do cleanup before state created by TestLauncher has been destroyed (such | |
| 55 // as the AtExitManager). | |
| 56 virtual void OnDoneRunningTests(); | |
|
jam
2016/03/23 15:12:16
nit: move this to the end (after line 70) so that
| |
| 57 | |
| 53 // Called prior to running each test. The delegate may alter the CommandLine | 58 // Called prior to running each test. The delegate may alter the CommandLine |
| 54 // and options used to launch the subprocess. Additionally the client may | 59 // and options used to launch the subprocess. Additionally the client may |
| 55 // return a TestState that is destroyed once the test completes as well as | 60 // return a TestState that is destroyed once the test completes as well as |
| 56 // once the test process is launched. | 61 // once the test process is launched. |
| 57 // | 62 // |
| 58 // NOTE: this is not called if --single_process is supplied. | 63 // NOTE: this is not called if --single_process is supplied. |
| 59 virtual scoped_ptr<TestState> PreRunTest( | 64 virtual scoped_ptr<TestState> PreRunTest( |
| 60 base::CommandLine* command_line, | 65 base::CommandLine* command_line, |
| 61 base::TestLauncher::LaunchOptions* test_launch_options); | 66 base::TestLauncher::LaunchOptions* test_launch_options); |
| 62 | 67 |
| (...skipping 12 matching lines...) Expand all Loading... | |
| 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 |