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

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

Issue 10803026: Get content_browsertest working. I've added a simple test for now, and will convert the tests in sr… (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: get it working on mac + linux, fix unittests crash, and fix unittest link error and add missing dep… Created 8 years, 5 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 | Annotate | Revision Log
« no previous file with comments | « content/public/test/browser_test_utils.h ('k') | content/shell/shell.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 10
11 class CommandLine; 11 class CommandLine;
12 12
13 namespace base {
14 class RunLoop;
15 }
16
13 namespace test_launcher { 17 namespace test_launcher {
14 18
15 extern const char kEmptyTestName[]; 19 extern const char kEmptyTestName[];
16 extern const char kGTestFilterFlag[]; 20 extern const char kGTestFilterFlag[];
17 extern const char kGTestHelpFlag[]; 21 extern const char kGTestHelpFlag[];
18 extern const char kGTestListTestsFlag[]; 22 extern const char kGTestListTestsFlag[];
19 extern const char kGTestRepeatFlag[]; 23 extern const char kGTestRepeatFlag[];
20 extern const char kGTestRunDisabledTestsFlag[]; 24 extern const char kGTestRunDisabledTestsFlag[];
21 extern const char kGTestOutputFlag[]; 25 extern const char kGTestOutputFlag[];
22 extern const char kHelpFlag[]; 26 extern const char kHelpFlag[];
23 27
24 // Flag that causes only the kEmptyTestName test to be run. 28 // Flag that causes only the kEmptyTestName test to be run.
25 extern const char kWarmupFlag[]; 29 extern const char kWarmupFlag[];
26 30
27 class TestLauncherDelegate { 31 class TestLauncherDelegate {
28 public: 32 public:
29 virtual void EarlyInitialize() = 0; 33 virtual void EarlyInitialize() = 0;
30 virtual bool Run(int argc, char** argv, int* return_code) = 0; 34 virtual bool Run(int argc, char** argv, int* return_code) = 0;
31 virtual int RunTestSuite(int argc, char** argv) = 0; 35 virtual int RunTestSuite(int argc, char** argv) = 0;
32 virtual bool AdjustChildProcessCommandLine(CommandLine* command_line) = 0; 36 virtual bool AdjustChildProcessCommandLine(CommandLine* command_line) = 0;
37 virtual void PreRunMessageLoop(base::RunLoop* run_loop) {}
38 virtual void PostRunMessageLoop() {}
33 39
34 protected: 40 protected:
35 virtual ~TestLauncherDelegate(); 41 virtual ~TestLauncherDelegate();
36 }; 42 };
37 43
38 int LaunchTests(TestLauncherDelegate* launcher_delegate, 44 int LaunchTests(TestLauncherDelegate* launcher_delegate,
39 int argc, 45 int argc,
40 char** argv) WARN_UNUSED_RESULT; 46 char** argv) WARN_UNUSED_RESULT;
41 47
48 TestLauncherDelegate* GetCurrentTestLauncherDelegate();
49
42 } // namespace test_launcher 50 } // namespace test_launcher
43 51
44 #endif // CONTENT_PUBLIC_TEST_TEST_LAUNCHER_H_ 52 #endif // CONTENT_PUBLIC_TEST_TEST_LAUNCHER_H_
OLDNEW
« no previous file with comments | « content/public/test/browser_test_utils.h ('k') | content/shell/shell.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698