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

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
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 terrib le
jam 2011/09/29 23:07:06 why copy this code now?
Paweł Hajdan Jr. 2011/09/29 23:21:47 I think that's simpler than adding even more indir
jam 2011/09/29 23:33:58 I think we have to share this code, given how frag
27 // UI. Instead, there should be some sort of signal flag on the command lin e,
28 // with all subsequent arguments passed through to the underlying browser.
29 if (command_line->HasSwitch(test_launcher::kSingleProcessTestsFlag) ||
30 command_line->HasSwitch(test_launcher::kSingleProcessTestsAndChromeFlag) ||
31 command_line->HasSwitch(test_launcher::kGTestListTestsFlag) ||
32 command_line->HasSwitch(test_launcher::kGTestHelpFlag)) {
33 *return_code = ContentTestSuite(argc, argv).Run();
34 return true;
35 }
36
37 return false;
38 }
39
40 virtual bool AdjustChildProcessCommandLine(
41 CommandLine* command_line) OVERRIDE {
42 return true;
43 }
44
45 private:
46 DISALLOW_COPY_AND_ASSIGN(ContentTestLauncherDelegate);
47 };
48
49 int main(int argc, char** argv) {
50 ContentTestLauncherDelegate launcher_delegate;
51 return test_launcher::LaunchTests(&launcher_delegate, argc, argv);
52 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698