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

Side by Side Diff: headless/test/headless_test_launcher.cc

Issue 1781193004: headless: Make it possible to configure an HTTP proxy (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Review comments. Created 4 years, 9 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
« no previous file with comments | « headless/test/headless_browser_test.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 #include "base/bind.h" 5 #include "base/bind.h"
6 #include "base/macros.h" 6 #include "base/macros.h"
7 #include "base/sys_info.h" 7 #include "base/sys_info.h"
8 #include "content/public/test/content_test_suite_base.h" 8 #include "content/public/test/content_test_suite_base.h"
9 #include "content/public/test/test_launcher.h" 9 #include "content/public/test/test_launcher.h"
10 #include "headless/lib/browser/headless_browser_impl.h" 10 #include "headless/lib/browser/headless_browser_impl.h"
(...skipping 27 matching lines...) Expand all
38 } 38 }
39 39
40 bool AdjustChildProcessCommandLine( 40 bool AdjustChildProcessCommandLine(
41 base::CommandLine* command_line, 41 base::CommandLine* command_line,
42 const base::FilePath& temp_data_dir) override { 42 const base::FilePath& temp_data_dir) override {
43 return true; 43 return true;
44 } 44 }
45 45
46 protected: 46 protected:
47 content::ContentMainDelegate* CreateContentMainDelegate() override { 47 content::ContentMainDelegate* CreateContentMainDelegate() override {
48 // TODO(skyostil): Add a way to test custom options. 48 // Use HeadlessBrowserTest::SetBrowserOptions to override these defaults.
49 HeadlessBrowser::Options::Builder options_builder(0, nullptr); 49 HeadlessBrowser::Options::Builder options_builder;
50 scoped_ptr<HeadlessBrowserImpl> browser( 50 scoped_ptr<HeadlessBrowserImpl> browser(
51 new HeadlessBrowserImplForTest(options_builder.Build())); 51 new HeadlessBrowserImplForTest(options_builder.Build()));
52 return new HeadlessContentMainDelegate(std::move(browser)); 52 return new HeadlessContentMainDelegate(std::move(browser));
53 } 53 }
54 54
55 private: 55 private:
56 DISALLOW_COPY_AND_ASSIGN(HeadlessTestLauncherDelegate); 56 DISALLOW_COPY_AND_ASSIGN(HeadlessTestLauncherDelegate);
57 }; 57 };
58 58
59 } // namespace 59 } // namespace
60 } // namespace headless 60 } // namespace headless
61 61
62 int main(int argc, char** argv) { 62 int main(int argc, char** argv) {
63 int default_jobs = std::max(1, base::SysInfo::NumberOfProcessors() / 2); 63 int default_jobs = std::max(1, base::SysInfo::NumberOfProcessors() / 2);
64 headless::HeadlessTestLauncherDelegate launcher_delegate; 64 headless::HeadlessTestLauncherDelegate launcher_delegate;
65 return LaunchTests(&launcher_delegate, default_jobs, argc, argv); 65 return LaunchTests(&launcher_delegate, default_jobs, argc, argv);
66 } 66 }
OLDNEW
« no previous file with comments | « headless/test/headless_browser_test.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698