Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(515)

Side by Side Diff: content/public/test/test_launcher.h

Issue 2893703002: Cleanup PreferenceMACs on browser_tests startup (Closed)
Patch Set: fix compile Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 <memory> 8 #include <memory>
9 #include <string> 9 #include <string>
10 10
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 // Called prior to running each test. The delegate may alter the CommandLine 51 // Called prior to running each test. The delegate may alter the CommandLine
52 // and options used to launch the subprocess. Additionally the client may 52 // and options used to launch the subprocess. Additionally the client may
53 // return a TestState that is destroyed once the test completes as well as 53 // return a TestState that is destroyed once the test completes as well as
54 // once the test process is launched. 54 // once the test process is launched.
55 // 55 //
56 // NOTE: this is not called if --single_process is supplied. 56 // NOTE: this is not called if --single_process is supplied.
57 virtual std::unique_ptr<TestState> PreRunTest( 57 virtual std::unique_ptr<TestState> PreRunTest(
58 base::CommandLine* command_line, 58 base::CommandLine* command_line,
59 base::TestLauncher::LaunchOptions* test_launch_options); 59 base::TestLauncher::LaunchOptions* test_launch_options);
60 60
61 // Allows a TestLauncherDelegate to do work before the launcher shards test
62 // jobs.
63 virtual void PreSharding() {}
64
61 // Allows a TestLauncherDelegate to adjust the number of |default_jobs| used 65 // Allows a TestLauncherDelegate to adjust the number of |default_jobs| used
62 // when --test-launcher-jobs isn't specified on the command-line. 66 // when --test-launcher-jobs isn't specified on the command-line.
63 virtual void AdjustDefaultParallelJobs(int* default_jobs) {} 67 virtual void AdjustDefaultParallelJobs(int* default_jobs) {}
64 68
65 // Called prior to returning from LaunchTests(). Gives the delegate a chance 69 // Called prior to returning from LaunchTests(). Gives the delegate a chance
66 // to do cleanup before state created by TestLauncher has been destroyed (such 70 // to do cleanup before state created by TestLauncher has been destroyed (such
67 // as the AtExitManager). 71 // as the AtExitManager).
68 virtual void OnDoneRunningTests(); 72 virtual void OnDoneRunningTests();
69 73
70 protected: 74 protected:
71 virtual ~TestLauncherDelegate(); 75 virtual ~TestLauncherDelegate();
72 }; 76 };
73 77
74 // Launches tests using |launcher_delegate|. |default_jobs| is number 78 // Launches tests using |launcher_delegate|. |default_jobs| is number
75 // of test jobs to be run in parallel, unless overridden from the command line. 79 // of test jobs to be run in parallel, unless overridden from the command line.
76 // Returns exit code. 80 // Returns exit code.
77 int LaunchTests(TestLauncherDelegate* launcher_delegate, 81 int LaunchTests(TestLauncherDelegate* launcher_delegate,
78 int default_jobs, 82 int default_jobs,
79 int argc, 83 int argc,
80 char** argv) WARN_UNUSED_RESULT; 84 char** argv) WARN_UNUSED_RESULT;
81 85
82 TestLauncherDelegate* GetCurrentTestLauncherDelegate(); 86 TestLauncherDelegate* GetCurrentTestLauncherDelegate();
83 ContentMainParams* GetContentMainParams(); 87 ContentMainParams* GetContentMainParams();
84 88
85 } // namespace content 89 } // namespace content
86 90
87 #endif // CONTENT_PUBLIC_TEST_TEST_LAUNCHER_H_ 91 #endif // CONTENT_PUBLIC_TEST_TEST_LAUNCHER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698