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

Side by Side Diff: content/test/content_test_launcher.cc

Issue 8036044: Add (not yet working) content_browsertests target. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 2 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/test/content_browser_test.cc ('k') | content/test/test_launcher.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Property Changes:
Added: svn:eol-style
+ LF
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #include "content/test/test_launcher.h"
6
7 #include "base/command_line.h"
8 #include "base/logging.h"
9 #include "base/scoped_temp_dir.h"
10 #include "content/test/content_test_suite.h"
11
12 class ContentTestLauncherDelegate : public test_launcher::TestLauncherDelegate {
13 public:
14 ContentTestLauncherDelegate() {
15 }
16
17 virtual ~ContentTestLauncherDelegate() {
18 }
19
20 virtual void EarlyInitialize() OVERRIDE {
21 }
22
23 virtual bool Run(int argc, char** argv, int* return_code) OVERRIDE {
24 CommandLine* command_line = CommandLine::ForCurrentProcess();
25
26 // TODO(pkasting): This "single_process vs. single-process" design is
27 // terrible UI. Instead, there should be some sort of signal flag on the
28 // command line, with all subsequent arguments passed through to the
29 // underlying browser.
30 if (command_line->HasSwitch(test_launcher::kSingleProcessTestsFlag) ||
31 command_line->HasSwitch(
32 test_launcher::kSingleProcessTestsAndChromeFlag) ||
33 command_line->HasSwitch(test_launcher::kGTestListTestsFlag) ||
34 command_line->HasSwitch(test_launcher::kGTestHelpFlag)) {
35 *return_code = ContentTestSuite(argc, argv).Run();
36 return true;
37 }
38
39 return false;
40 }
41
42 virtual bool AdjustChildProcessCommandLine(
43 CommandLine* command_line) OVERRIDE {
44 return true;
45 }
46
47 private:
48 DISALLOW_COPY_AND_ASSIGN(ContentTestLauncherDelegate);
49 };
50
51 int main(int argc, char** argv) {
52 ContentTestLauncherDelegate launcher_delegate;
53 return test_launcher::LaunchTests(&launcher_delegate, argc, argv);
54 }
OLDNEW
« no previous file with comments | « content/test/content_browser_test.cc ('k') | content/test/test_launcher.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698