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

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

Issue 2489673005: [headless] Make browser service manifest overlay configurable. (Closed)
Patch Set: fix includes. Created 4 years, 1 month 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 <memory> 5 #include <memory>
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "base/sys_info.h" 9 #include "base/sys_info.h"
10 #include "content/public/test/content_test_suite_base.h" 10 #include "content/public/test/content_test_suite_base.h"
(...skipping 29 matching lines...) Expand all
40 } 40 }
41 41
42 bool AdjustChildProcessCommandLine( 42 bool AdjustChildProcessCommandLine(
43 base::CommandLine* command_line, 43 base::CommandLine* command_line,
44 const base::FilePath& temp_data_dir) override { 44 const base::FilePath& temp_data_dir) override {
45 return true; 45 return true;
46 } 46 }
47 47
48 protected: 48 protected:
49 content::ContentMainDelegate* CreateContentMainDelegate() override { 49 content::ContentMainDelegate* CreateContentMainDelegate() override {
50 // Use HeadlessBrowserTest::SetBrowserOptions to override these defaults. 50 // Use HeadlessBrowserTest::options() or HeadlessBrowserContextOptions to
51 // modify these defaults.
51 HeadlessBrowser::Options::Builder options_builder; 52 HeadlessBrowser::Options::Builder options_builder;
52 std::unique_ptr<HeadlessBrowserImpl> browser( 53 std::unique_ptr<HeadlessBrowserImpl> browser(
53 new HeadlessBrowserImplForTest(options_builder.Build())); 54 new HeadlessBrowserImplForTest(options_builder.Build()));
54 return new HeadlessContentMainDelegate(std::move(browser)); 55 return new HeadlessContentMainDelegate(std::move(browser));
55 } 56 }
56 57
57 private: 58 private:
58 DISALLOW_COPY_AND_ASSIGN(HeadlessTestLauncherDelegate); 59 DISALLOW_COPY_AND_ASSIGN(HeadlessTestLauncherDelegate);
59 }; 60 };
60 61
61 } // namespace 62 } // namespace
62 } // namespace headless 63 } // namespace headless
63 64
64 int main(int argc, char** argv) { 65 int main(int argc, char** argv) {
65 int default_jobs = std::max(1, base::SysInfo::NumberOfProcessors() / 2); 66 int default_jobs = std::max(1, base::SysInfo::NumberOfProcessors() / 2);
66 headless::HeadlessTestLauncherDelegate launcher_delegate; 67 headless::HeadlessTestLauncherDelegate launcher_delegate;
67 return LaunchTests(&launcher_delegate, default_jobs, argc, argv); 68 return LaunchTests(&launcher_delegate, default_jobs, argc, argv);
68 } 69 }
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