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

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

Issue 2832963002: Reland of Add --headless flag to Windows (Closed)
Patch Set: Created 3 years, 8 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/public/util/testing/generic_url_request_mocks.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 "headless/test/headless_browser_test.h" 5 #include "headless/test/headless_browser_test.h"
6 6
7 #include "base/files/file_path.h" 7 #include "base/files/file_path.h"
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "base/memory/ptr_util.h" 9 #include "base/memory/ptr_util.h"
10 #include "base/message_loop/message_loop.h" 10 #include "base/message_loop/message_loop.h"
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after
211 web_contents_->GetDevToolsTarget()->AttachClient(devtools_client_.get()); 211 web_contents_->GetDevToolsTarget()->AttachClient(devtools_client_.get());
212 RunDevTooledTest(); 212 RunDevTooledTest();
213 } 213 }
214 214
215 void HeadlessAsyncDevTooledBrowserTest::RenderProcessExited( 215 void HeadlessAsyncDevTooledBrowserTest::RenderProcessExited(
216 base::TerminationStatus status, 216 base::TerminationStatus status,
217 int exit_code) { 217 int exit_code) {
218 if (status == base::TERMINATION_STATUS_NORMAL_TERMINATION) 218 if (status == base::TERMINATION_STATUS_NORMAL_TERMINATION)
219 return; 219 return;
220 220
221 FAIL() << "Abnormal renderer termination";
222 FinishAsynchronousTest(); 221 FinishAsynchronousTest();
223 render_process_exited_ = true; 222 render_process_exited_ = true;
223 FAIL() << "Abnormal renderer termination";
224 } 224 }
225 225
226 void HeadlessAsyncDevTooledBrowserTest::RunTest() { 226 void HeadlessAsyncDevTooledBrowserTest::RunTest() {
227 HeadlessBrowserContext::Builder builder = 227 HeadlessBrowserContext::Builder builder =
228 browser()->CreateBrowserContextBuilder(); 228 browser()->CreateBrowserContextBuilder();
229 builder.SetProtocolHandlers(GetProtocolHandlers()); 229 builder.SetProtocolHandlers(GetProtocolHandlers());
230 if (GetCreateTabSocket()) { 230 if (GetCreateTabSocket()) {
231 builder.EnableUnsafeNetworkAccessWithMojoBindings(true); 231 builder.EnableUnsafeNetworkAccessWithMojoBindings(true);
232 builder.AddTabSocketMojoBindings(); 232 builder.AddTabSocketMojoBindings();
233 } 233 }
(...skipping 19 matching lines...) Expand all
253 253
254 ProtocolHandlerMap HeadlessAsyncDevTooledBrowserTest::GetProtocolHandlers() { 254 ProtocolHandlerMap HeadlessAsyncDevTooledBrowserTest::GetProtocolHandlers() {
255 return ProtocolHandlerMap(); 255 return ProtocolHandlerMap();
256 } 256 }
257 257
258 bool HeadlessAsyncDevTooledBrowserTest::GetCreateTabSocket() { 258 bool HeadlessAsyncDevTooledBrowserTest::GetCreateTabSocket() {
259 return false; 259 return false;
260 } 260 }
261 261
262 } // namespace headless 262 } // namespace headless
OLDNEW
« no previous file with comments | « headless/public/util/testing/generic_url_request_mocks.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698