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

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

Issue 2548883002: Revert of Add thread checking to RunLoop, deprecate MessageLoopRunner. (Closed)
Patch Set: Created 4 years 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
11 #include "base/compiler_specific.h" 11 #include "base/compiler_specific.h"
12 #include "base/test/launcher/test_launcher.h" 12 #include "base/test/launcher/test_launcher.h"
13 13
14 namespace base { 14 namespace base {
15 class CommandLine; 15 class CommandLine;
16 class FilePath; 16 class FilePath;
17 class RunLoop;
17 } 18 }
18 19
19 namespace content { 20 namespace content {
20 class ContentMainDelegate; 21 class ContentMainDelegate;
21 struct ContentMainParams; 22 struct ContentMainParams;
22 23
23 extern const char kEmptyTestName[]; 24 extern const char kEmptyTestName[];
24 extern const char kHelpFlag[]; 25 extern const char kHelpFlag[];
25 extern const char kLaunchAsBrowser[]; 26 extern const char kLaunchAsBrowser[];
26 extern const char kRunManualTestsFlag[]; 27 extern const char kRunManualTestsFlag[];
(...skipping 12 matching lines...) Expand all
39 virtual void ChildProcessLaunched(base::ProcessHandle handle, 40 virtual void ChildProcessLaunched(base::ProcessHandle handle,
40 base::ProcessId pid) = 0; 41 base::ProcessId pid) = 0;
41 }; 42 };
42 43
43 class TestLauncherDelegate { 44 class TestLauncherDelegate {
44 public: 45 public:
45 virtual int RunTestSuite(int argc, char** argv) = 0; 46 virtual int RunTestSuite(int argc, char** argv) = 0;
46 virtual bool AdjustChildProcessCommandLine( 47 virtual bool AdjustChildProcessCommandLine(
47 base::CommandLine* command_line, 48 base::CommandLine* command_line,
48 const base::FilePath& temp_data_dir) = 0; 49 const base::FilePath& temp_data_dir) = 0;
50 virtual void PreRunMessageLoop(base::RunLoop* run_loop) {}
51 virtual void PostRunMessageLoop() {}
49 virtual ContentMainDelegate* CreateContentMainDelegate() = 0; 52 virtual ContentMainDelegate* CreateContentMainDelegate() = 0;
50 53
51 // Called prior to running each test. The delegate may alter the CommandLine 54 // Called prior to running each test. The delegate may alter the CommandLine
52 // and options used to launch the subprocess. Additionally the client may 55 // 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 56 // return a TestState that is destroyed once the test completes as well as
54 // once the test process is launched. 57 // once the test process is launched.
55 // 58 //
56 // NOTE: this is not called if --single_process is supplied. 59 // NOTE: this is not called if --single_process is supplied.
57 virtual std::unique_ptr<TestState> PreRunTest( 60 virtual std::unique_ptr<TestState> PreRunTest(
58 base::CommandLine* command_line, 61 base::CommandLine* command_line,
(...skipping 19 matching lines...) Expand all
78 int default_jobs, 81 int default_jobs,
79 int argc, 82 int argc,
80 char** argv) WARN_UNUSED_RESULT; 83 char** argv) WARN_UNUSED_RESULT;
81 84
82 TestLauncherDelegate* GetCurrentTestLauncherDelegate(); 85 TestLauncherDelegate* GetCurrentTestLauncherDelegate();
83 ContentMainParams* GetContentMainParams(); 86 ContentMainParams* GetContentMainParams();
84 87
85 } // namespace content 88 } // namespace content
86 89
87 #endif // CONTENT_PUBLIC_TEST_TEST_LAUNCHER_H_ 90 #endif // CONTENT_PUBLIC_TEST_TEST_LAUNCHER_H_
OLDNEW
« no previous file with comments | « content/browser/loader/async_revalidation_manager_browsertest.cc ('k') | content/public/test/test_utils.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698