New issue
Advanced search Search tips
Starred by 39 users
Status: Fixed
Owner:
Closed: May 26
Components:
EstimatedDays: ----
NextAction: ----
OS: Windows
Pri: ----
Type: ----

Blocked on:
issue 714841

Blocking:
issue 711540
issue 712981


Show other hotlists

Hotlists containing this issue:
Hotlist-1


Sign in to add a comment
Make headless work on Windows
Project Member Reported by dvallet@chromium.org, Jan 30 2017 Back to list
Steps: 
1. Make headless_shell compile and run in Windows
2. Enable chrome --headless in Windows
 
Project Member Comment 1 by bugdroid1@chromium.org, Feb 13 2017
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/79dd3437b6e5dddaafeca8a50d07a0acd82b3c57

commit 79dd3437b6e5dddaafeca8a50d07a0acd82b3c57
Author: dvallet <dvallet@chromium.org>
Date: Mon Feb 13 03:11:47 2017

Make headless_shell target compile for Windows:
- Add necessary configs so exec file can be compiled
- Enable logging options (this is enforced in windows, otherwise logging path will fail with DCHECK)
- Change screenshot file writing to use file_proxy, since file_stream does not work properly in linux: it's harcoded
to use message_loop_io to do the write, which does not work in Windows since the the FileThread is attached to the ui message loop
- Adds special rules in devtools code generation scripts to avoid collision with windows specific macros (like ERR)
- Changes the way the command line is parsed so its compatible with Windows
- Modify headless.gn args to be compatible with windows also.
- And some nits under #if defined(OS_WIN)

BUG=686608

Review-Url: https://codereview.chromium.org/2666503002
Cr-Commit-Position: refs/heads/master@{#449906}

[modify] https://crrev.com/79dd3437b6e5dddaafeca8a50d07a0acd82b3c57/headless/BUILD.gn
[modify] https://crrev.com/79dd3437b6e5dddaafeca8a50d07a0acd82b3c57/headless/app/headless_shell.cc
[modify] https://crrev.com/79dd3437b6e5dddaafeca8a50d07a0acd82b3c57/headless/app/headless_shell.h
[modify] https://crrev.com/79dd3437b6e5dddaafeca8a50d07a0acd82b3c57/headless/lib/browser/devtools_api/client_api_generator.py
[modify] https://crrev.com/79dd3437b6e5dddaafeca8a50d07a0acd82b3c57/headless/lib/browser/devtools_api/domain_cc.template
[modify] https://crrev.com/79dd3437b6e5dddaafeca8a50d07a0acd82b3c57/headless/lib/browser/devtools_api/domain_h.template
[modify] https://crrev.com/79dd3437b6e5dddaafeca8a50d07a0acd82b3c57/headless/lib/browser/headless_browser_impl.cc
[modify] https://crrev.com/79dd3437b6e5dddaafeca8a50d07a0acd82b3c57/headless/lib/headless_browser_browsertest.cc
[modify] https://crrev.com/79dd3437b6e5dddaafeca8a50d07a0acd82b3c57/headless/lib/headless_content_main_delegate.cc
[modify] https://crrev.com/79dd3437b6e5dddaafeca8a50d07a0acd82b3c57/headless/lib/headless_content_main_delegate.h
[modify] https://crrev.com/79dd3437b6e5dddaafeca8a50d07a0acd82b3c57/headless/public/headless_shell.h
[modify] https://crrev.com/79dd3437b6e5dddaafeca8a50d07a0acd82b3c57/headless/public/util/deterministic_dispatcher.cc

Project Member Comment 2 by bugdroid1@chromium.org, Feb 17 2017
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/836c34d725d9bc2bd5e071fd0ff99ac0330bca68

commit 836c34d725d9bc2bd5e071fd0ff99ac0330bca68
Author: dvallet <dvallet@chromium.org>
Date: Fri Feb 17 05:17:14 2017

Change platform methods and try to make init logging logic clearer
BUG=686608

Review-Url: https://codereview.chromium.org/2690163005
Cr-Commit-Position: refs/heads/master@{#451229}

[modify] https://crrev.com/836c34d725d9bc2bd5e071fd0ff99ac0330bca68/headless/lib/browser/headless_browser_impl.h
[modify] https://crrev.com/836c34d725d9bc2bd5e071fd0ff99ac0330bca68/headless/lib/browser/headless_browser_impl_aura.cc
[modify] https://crrev.com/836c34d725d9bc2bd5e071fd0ff99ac0330bca68/headless/lib/browser/headless_web_contents_impl.cc
[modify] https://crrev.com/836c34d725d9bc2bd5e071fd0ff99ac0330bca68/headless/lib/headless_content_main_delegate.cc

Project Member Comment 3 by bugdroid1@chromium.org, Mar 9 2017
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/0570f08c526622c02b11d76a87c8bd444691e8e6

commit 0570f08c526622c02b11d76a87c8bd444691e8e6
Author: cvaughn <cvaughn@gmail.com>
Date: Thu Mar 09 02:13:20 2017

Set up the sandbox specifically for Windows, move non-windows functionality behind an ifdef.

BUG=686608

Review-Url: https://codereview.chromium.org/2624343002
Cr-Commit-Position: refs/heads/master@{#455640}

[modify] https://crrev.com/0570f08c526622c02b11d76a87c8bd444691e8e6/AUTHORS
[modify] https://crrev.com/0570f08c526622c02b11d76a87c8bd444691e8e6/headless/BUILD.gn
[modify] https://crrev.com/0570f08c526622c02b11d76a87c8bd444691e8e6/headless/lib/browser/DEPS
[modify] https://crrev.com/0570f08c526622c02b11d76a87c8bd444691e8e6/headless/lib/browser/headless_browser_impl.cc
[modify] https://crrev.com/0570f08c526622c02b11d76a87c8bd444691e8e6/headless/lib/headless_content_main_delegate.cc

Project Member Comment 4 by bugdroid1@chromium.org, Mar 27 2017
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/edb2d15c8a542b5e7ee88fd49a055b4a8d62ff56

commit edb2d15c8a542b5e7ee88fd49a055b4a8d62ff56
Author: dvallet <dvallet@chromium.org>
Date: Mon Mar 27 03:10:33 2017

Fix missing HEADLESS_EXPORT defines

BUG=686608

Review-Url: https://codereview.chromium.org/2775693003
Cr-Commit-Position: refs/heads/master@{#459694}

[modify] https://crrev.com/edb2d15c8a542b5e7ee88fd49a055b4a8d62ff56/headless/lib/browser/devtools_api/domain_h.template
[modify] https://crrev.com/edb2d15c8a542b5e7ee88fd49a055b4a8d62ff56/headless/lib/browser/headless_browser_impl.h
[modify] https://crrev.com/edb2d15c8a542b5e7ee88fd49a055b4a8d62ff56/headless/lib/browser/headless_web_contents_impl.h
[modify] https://crrev.com/edb2d15c8a542b5e7ee88fd49a055b4a8d62ff56/headless/lib/headless_content_main_delegate.h
[modify] https://crrev.com/edb2d15c8a542b5e7ee88fd49a055b4a8d62ff56/headless/public/headless_web_contents.h
[modify] https://crrev.com/edb2d15c8a542b5e7ee88fd49a055b4a8d62ff56/headless/public/util/deterministic_dispatcher.h
[modify] https://crrev.com/edb2d15c8a542b5e7ee88fd49a055b4a8d62ff56/headless/public/util/deterministic_http_protocol_handler.h
[modify] https://crrev.com/edb2d15c8a542b5e7ee88fd49a055b4a8d62ff56/headless/public/util/dom_tree_extractor.h
[modify] https://crrev.com/edb2d15c8a542b5e7ee88fd49a055b4a8d62ff56/headless/public/util/expedited_dispatcher.h
[modify] https://crrev.com/edb2d15c8a542b5e7ee88fd49a055b4a8d62ff56/headless/public/util/flat_dom_tree_extractor.h
[modify] https://crrev.com/edb2d15c8a542b5e7ee88fd49a055b4a8d62ff56/headless/public/util/generic_url_request_job.h
[modify] https://crrev.com/edb2d15c8a542b5e7ee88fd49a055b4a8d62ff56/headless/public/util/managed_dispatch_url_request_job.h
[modify] https://crrev.com/edb2d15c8a542b5e7ee88fd49a055b4a8d62ff56/headless/public/util/testing/generic_url_request_mocks.h
[modify] https://crrev.com/edb2d15c8a542b5e7ee88fd49a055b4a8d62ff56/headless/public/util/url_fetcher.h
[modify] https://crrev.com/edb2d15c8a542b5e7ee88fd49a055b4a8d62ff56/headless/public/util/url_request_dispatcher.h

Blocking: 712981
Blocking: 711540
Project Member Comment 7 by bugdroid1@chromium.org, Apr 20 2017
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/e3c745d4b37a659afaa0358c7de7b9bc881decb5

commit e3c745d4b37a659afaa0358c7de7b9bc881decb5
Author: dvallet <dvallet@chromium.org>
Date: Thu Apr 20 22:56:47 2017

Launch bug: https://bugs.chromium.org/p/chromium/issues/detail?id=705916

Add --headless flag to Windows:

Fix browser_tests not compiling properly on windows
Fix headless/BUILD.gn by:
   - Changing headless_lib to a headless component, following steps in https://chromium.googlesource.com/chromium/src/+/master/docs/component_build.md and fixing the build for linux, since it now compiles as a shared_library when component build is true.
   - Adding neccesary HEADLESS_EXPORT (submitted in https://codereview.chromium.org/2775693003/)
   - Disabling breakpad in windows (will fix in a separate CL)

BUG=686608

Review-Url: https://codereview.chromium.org/2762593002
Cr-Commit-Position: refs/heads/master@{#466176}

[modify] https://crrev.com/e3c745d4b37a659afaa0358c7de7b9bc881decb5/chrome/BUILD.gn
[modify] https://crrev.com/e3c745d4b37a659afaa0358c7de7b9bc881decb5/chrome/app/chrome_main.cc
[modify] https://crrev.com/e3c745d4b37a659afaa0358c7de7b9bc881decb5/headless/BUILD.gn
[modify] https://crrev.com/e3c745d4b37a659afaa0358c7de7b9bc881decb5/headless/DEPS
[modify] https://crrev.com/e3c745d4b37a659afaa0358c7de7b9bc881decb5/headless/app/headless_example.cc
[modify] https://crrev.com/e3c745d4b37a659afaa0358c7de7b9bc881decb5/headless/app/headless_shell.cc
[modify] https://crrev.com/e3c745d4b37a659afaa0358c7de7b9bc881decb5/headless/app/headless_shell.h
[modify] https://crrev.com/e3c745d4b37a659afaa0358c7de7b9bc881decb5/headless/app/headless_shell_main.cc
[modify] https://crrev.com/e3c745d4b37a659afaa0358c7de7b9bc881decb5/headless/app/headless_shell_switches.cc
[modify] https://crrev.com/e3c745d4b37a659afaa0358c7de7b9bc881decb5/headless/app/headless_shell_switches.h
[modify] https://crrev.com/e3c745d4b37a659afaa0358c7de7b9bc881decb5/headless/lib/browser/DEPS
[modify] https://crrev.com/e3c745d4b37a659afaa0358c7de7b9bc881decb5/headless/lib/browser/headless_browser_impl.cc
[modify] https://crrev.com/e3c745d4b37a659afaa0358c7de7b9bc881decb5/headless/lib/headless_browser_browsertest.cc
[modify] https://crrev.com/e3c745d4b37a659afaa0358c7de7b9bc881decb5/headless/lib/headless_content_main_delegate.cc
[modify] https://crrev.com/e3c745d4b37a659afaa0358c7de7b9bc881decb5/headless/lib/headless_content_main_delegate.h
[modify] https://crrev.com/e3c745d4b37a659afaa0358c7de7b9bc881decb5/headless/public/headless_browser.cc
[modify] https://crrev.com/e3c745d4b37a659afaa0358c7de7b9bc881decb5/headless/public/headless_browser.h
[modify] https://crrev.com/e3c745d4b37a659afaa0358c7de7b9bc881decb5/headless/public/headless_shell.h
[modify] https://crrev.com/e3c745d4b37a659afaa0358c7de7b9bc881decb5/headless/public/util/deterministic_http_protocol_handler.cc
[modify] https://crrev.com/e3c745d4b37a659afaa0358c7de7b9bc881decb5/headless/public/util/generic_url_request_job.h
[modify] https://crrev.com/e3c745d4b37a659afaa0358c7de7b9bc881decb5/headless/public/util/testing/generic_url_request_mocks.cc
[modify] https://crrev.com/e3c745d4b37a659afaa0358c7de7b9bc881decb5/headless/test/headless_browser_test.cc

Project Member Comment 8 by bugdroid1@chromium.org, Apr 20 2017
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/87a65c2fbb5db04ce025fadbfdfc7183003f6831

commit 87a65c2fbb5db04ce025fadbfdfc7183003f6831
Author: findit-for-me <findit-for-me@appspot.gserviceaccount.com>
Date: Thu Apr 20 23:32:53 2017

Revert of Add --headless flag to Windows (patchset #28 id:540001 of https://codereview.chromium.org/2762593002/ )

Reason for revert:

Findit(https://goo.gl/kROfz5) identified CL at revision 466176 as the
culprit for failures in the build cycles as shown on:
https://findit-for-me.appspot.com/waterfall/culprit?key=ag9zfmZpbmRpdC1mb3ItbWVyRAsSDVdmU3VzcGVjdGVkQ0wiMWNocm9taXVtL2UzYzc0NWQ0YjM3YTY1OWFmYWEwMzU4YzdkZTdiOWJjODgxZGVjYjUM

Original issue's description:
> Launch bug: https://bugs.chromium.org/p/chromium/issues/detail?id=705916
>
> Add --headless flag to Windows:
>
> Fix browser_tests not compiling properly on windows
> Fix headless/BUILD.gn by:
>    - Changing headless_lib to a headless component, following steps in https://chromium.googlesource.com/chromium/src/+/master/docs/component_build.md and fixing the build for linux, since it now compiles as a shared_library when component build is true.
>    - Adding neccesary HEADLESS_EXPORT (submitted in https://codereview.chromium.org/2775693003/)
>    - Disabling breakpad in windows (will fix in a separate CL)
>
>
> BUG=686608
>
> Review-Url: https://codereview.chromium.org/2762593002
> Cr-Commit-Position: refs/heads/master@{#466176}
> Committed: https://chromium.googlesource.com/chromium/src/+/e3c745d4b37a659afaa0358c7de7b9bc881decb5

TBR=alexclarke@chromium.org,sky@chromium.org,skyostil@chromium.org,wfh@chromium.org,jzfeng@chromium.org,nick@chromium.org,dvallet@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=686608

Review-Url: https://codereview.chromium.org/2835603002
Cr-Commit-Position: refs/heads/master@{#466189}

[modify] https://crrev.com/87a65c2fbb5db04ce025fadbfdfc7183003f6831/chrome/BUILD.gn
[modify] https://crrev.com/87a65c2fbb5db04ce025fadbfdfc7183003f6831/chrome/app/chrome_main.cc
[modify] https://crrev.com/87a65c2fbb5db04ce025fadbfdfc7183003f6831/headless/BUILD.gn
[modify] https://crrev.com/87a65c2fbb5db04ce025fadbfdfc7183003f6831/headless/DEPS
[modify] https://crrev.com/87a65c2fbb5db04ce025fadbfdfc7183003f6831/headless/app/headless_example.cc
[modify] https://crrev.com/87a65c2fbb5db04ce025fadbfdfc7183003f6831/headless/app/headless_shell.cc
[modify] https://crrev.com/87a65c2fbb5db04ce025fadbfdfc7183003f6831/headless/app/headless_shell.h
[modify] https://crrev.com/87a65c2fbb5db04ce025fadbfdfc7183003f6831/headless/app/headless_shell_main.cc
[modify] https://crrev.com/87a65c2fbb5db04ce025fadbfdfc7183003f6831/headless/app/headless_shell_switches.cc
[modify] https://crrev.com/87a65c2fbb5db04ce025fadbfdfc7183003f6831/headless/app/headless_shell_switches.h
[modify] https://crrev.com/87a65c2fbb5db04ce025fadbfdfc7183003f6831/headless/lib/browser/DEPS
[modify] https://crrev.com/87a65c2fbb5db04ce025fadbfdfc7183003f6831/headless/lib/browser/headless_browser_impl.cc
[modify] https://crrev.com/87a65c2fbb5db04ce025fadbfdfc7183003f6831/headless/lib/headless_browser_browsertest.cc
[modify] https://crrev.com/87a65c2fbb5db04ce025fadbfdfc7183003f6831/headless/lib/headless_content_main_delegate.cc
[modify] https://crrev.com/87a65c2fbb5db04ce025fadbfdfc7183003f6831/headless/lib/headless_content_main_delegate.h
[modify] https://crrev.com/87a65c2fbb5db04ce025fadbfdfc7183003f6831/headless/public/headless_browser.cc
[modify] https://crrev.com/87a65c2fbb5db04ce025fadbfdfc7183003f6831/headless/public/headless_browser.h
[modify] https://crrev.com/87a65c2fbb5db04ce025fadbfdfc7183003f6831/headless/public/headless_shell.h
[modify] https://crrev.com/87a65c2fbb5db04ce025fadbfdfc7183003f6831/headless/public/util/deterministic_http_protocol_handler.cc
[modify] https://crrev.com/87a65c2fbb5db04ce025fadbfdfc7183003f6831/headless/public/util/generic_url_request_job.h
[modify] https://crrev.com/87a65c2fbb5db04ce025fadbfdfc7183003f6831/headless/public/util/testing/generic_url_request_mocks.cc
[modify] https://crrev.com/87a65c2fbb5db04ce025fadbfdfc7183003f6831/headless/test/headless_browser_test.cc

Project Member Comment 9 by bugdroid1@chromium.org, Apr 21 2017
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/e0800c0393765b299e3fcd81f2d97b8bbe997a2f

commit e0800c0393765b299e3fcd81f2d97b8bbe997a2f
Author: dvallet <dvallet@chromium.org>
Date: Fri Apr 21 01:09:28 2017

Reland of Add --headless flag to Windows (patchset #1 id:1 of https://codereview.chromium.org/2835603002/ )

Reason for revert:
Re-land patch set, looks like it could've been a transient issue with Mac waterfall build, patching in updated upstream and investigating

Original issue's description:
> Revert of Add --headless flag to Windows (patchset #28 id:540001 of https://codereview.chromium.org/2762593002/ )
>
> Reason for revert:
>
> Findit(https://goo.gl/kROfz5) identified CL at revision 466176 as the
> culprit for failures in the build cycles as shown on:
> https://findit-for-me.appspot.com/waterfall/culprit?key=ag9zfmZpbmRpdC1mb3ItbWVyRAsSDVdmU3VzcGVjdGVkQ0wiMWNocm9taXVtL2UzYzc0NWQ0YjM3YTY1OWFmYWEwMzU4YzdkZTdiOWJjODgxZGVjYjUM
>
> Original issue's description:
> > Launch bug: https://bugs.chromium.org/p/chromium/issues/detail?id=705916
> >
> > Add --headless flag to Windows:
> >
> > Fix browser_tests not compiling properly on windows
> > Fix headless/BUILD.gn by:
> >    - Changing headless_lib to a headless component, following steps in https://chromium.googlesource.com/chromium/src/+/master/docs/component_build.md and fixing the build for linux, since it now compiles as a shared_library when component build is true.
> >    - Adding neccesary HEADLESS_EXPORT (submitted in https://codereview.chromium.org/2775693003/)
> >    - Disabling breakpad in windows (will fix in a separate CL)
> >
> >
> > BUG=686608
> >
> > Review-Url: https://codereview.chromium.org/2762593002
> > Cr-Commit-Position: refs/heads/master@{#466176}
> > Committed: https://chromium.googlesource.com/chromium/src/+/e3c745d4b37a659afaa0358c7de7b9bc881decb5
>
> TBR=alexclarke@chromium.org,sky@chromium.org,skyostil@chromium.org,wfh@chromium.org,jzfeng@chromium.org,nick@chromium.org,dvallet@chromium.org
> # Skipping CQ checks because original CL landed less than 1 days ago.
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> BUG=686608
>
> Review-Url: https://codereview.chromium.org/2835603002
> Cr-Commit-Position: refs/heads/master@{#466189}
> Committed: https://chromium.googlesource.com/chromium/src/+/87a65c2fbb5db04ce025fadbfdfc7183003f6831

TBR=nick@chromium.org,tdanderson@google.com,jzfeng@chromium.org,fhorschig@google.com,sky@chromium.org,keishi@google.com,xlai@google.com,alexclarke@chromium.org,skyostil@chromium.org,wfh@chromium.org,tdanderson@chromium.org,findit-for-me@appspot.gserviceaccount.com
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=686608

Review-Url: https://codereview.chromium.org/2832963002
Cr-Commit-Position: refs/heads/master@{#466206}

[modify] https://crrev.com/e0800c0393765b299e3fcd81f2d97b8bbe997a2f/chrome/BUILD.gn
[modify] https://crrev.com/e0800c0393765b299e3fcd81f2d97b8bbe997a2f/chrome/app/chrome_main.cc
[modify] https://crrev.com/e0800c0393765b299e3fcd81f2d97b8bbe997a2f/headless/BUILD.gn
[modify] https://crrev.com/e0800c0393765b299e3fcd81f2d97b8bbe997a2f/headless/DEPS
[modify] https://crrev.com/e0800c0393765b299e3fcd81f2d97b8bbe997a2f/headless/app/headless_example.cc
[modify] https://crrev.com/e0800c0393765b299e3fcd81f2d97b8bbe997a2f/headless/app/headless_shell.cc
[modify] https://crrev.com/e0800c0393765b299e3fcd81f2d97b8bbe997a2f/headless/app/headless_shell.h
[modify] https://crrev.com/e0800c0393765b299e3fcd81f2d97b8bbe997a2f/headless/app/headless_shell_main.cc
[modify] https://crrev.com/e0800c0393765b299e3fcd81f2d97b8bbe997a2f/headless/app/headless_shell_switches.cc
[modify] https://crrev.com/e0800c0393765b299e3fcd81f2d97b8bbe997a2f/headless/app/headless_shell_switches.h
[modify] https://crrev.com/e0800c0393765b299e3fcd81f2d97b8bbe997a2f/headless/lib/browser/DEPS
[modify] https://crrev.com/e0800c0393765b299e3fcd81f2d97b8bbe997a2f/headless/lib/browser/headless_browser_impl.cc
[modify] https://crrev.com/e0800c0393765b299e3fcd81f2d97b8bbe997a2f/headless/lib/headless_browser_browsertest.cc
[modify] https://crrev.com/e0800c0393765b299e3fcd81f2d97b8bbe997a2f/headless/lib/headless_content_main_delegate.cc
[modify] https://crrev.com/e0800c0393765b299e3fcd81f2d97b8bbe997a2f/headless/lib/headless_content_main_delegate.h
[modify] https://crrev.com/e0800c0393765b299e3fcd81f2d97b8bbe997a2f/headless/public/headless_browser.cc
[modify] https://crrev.com/e0800c0393765b299e3fcd81f2d97b8bbe997a2f/headless/public/headless_browser.h
[modify] https://crrev.com/e0800c0393765b299e3fcd81f2d97b8bbe997a2f/headless/public/headless_shell.h
[modify] https://crrev.com/e0800c0393765b299e3fcd81f2d97b8bbe997a2f/headless/public/util/deterministic_http_protocol_handler.cc
[modify] https://crrev.com/e0800c0393765b299e3fcd81f2d97b8bbe997a2f/headless/public/util/generic_url_request_job.h
[modify] https://crrev.com/e0800c0393765b299e3fcd81f2d97b8bbe997a2f/headless/public/util/testing/generic_url_request_mocks.cc
[modify] https://crrev.com/e0800c0393765b299e3fcd81f2d97b8bbe997a2f/headless/test/headless_browser_test.cc

Project Member Comment 10 by bugdroid1@chromium.org, Apr 21 2017
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/4f8bacc309f5ae27a5b2204231c6e59511f6bf42

commit 4f8bacc309f5ae27a5b2204231c6e59511f6bf42
Author: keishi <keishi@chromium.org>
Date: Fri Apr 21 01:39:30 2017

Revert of Add --headless flag to Windows (patchset #1 id:1 of https://codereview.chromium.org/2832963002/ )

Reason for revert:
Failed compilation on Mac bot
https://luci-logdog.appspot.com/v/?s=chromium%2Fbb%2Fchromium%2FMac%2F26461%2F%2B%2Frecipes%2Fsteps%2Fcompile%2F0%2Fstdout

Original issue's description:
> Reland of Add --headless flag to Windows (patchset #1 id:1 of https://codereview.chromium.org/2835603002/ )
>
> Reason for revert:
> Re-land patch set, looks like it could've been a transient issue with Mac waterfall build, patching in updated upstream and investigating
>
> Original issue's description:
> > Revert of Add --headless flag to Windows (patchset #28 id:540001 of https://codereview.chromium.org/2762593002/ )
> >
> > Reason for revert:
> >
> > Findit(https://goo.gl/kROfz5) identified CL at revision 466176 as the
> > culprit for failures in the build cycles as shown on:
> > https://findit-for-me.appspot.com/waterfall/culprit?key=ag9zfmZpbmRpdC1mb3ItbWVyRAsSDVdmU3VzcGVjdGVkQ0wiMWNocm9taXVtL2UzYzc0NWQ0YjM3YTY1OWFmYWEwMzU4YzdkZTdiOWJjODgxZGVjYjUM
> >
> > Original issue's description:
> > > Launch bug: https://bugs.chromium.org/p/chromium/issues/detail?id=705916
> > >
> > > Add --headless flag to Windows:
> > >
> > > Fix browser_tests not compiling properly on windows
> > > Fix headless/BUILD.gn by:
> > >    - Changing headless_lib to a headless component, following steps in https://chromium.googlesource.com/chromium/src/+/master/docs/component_build.md and fixing the build for linux, since it now compiles as a shared_library when component build is true.
> > >    - Adding neccesary HEADLESS_EXPORT (submitted in https://codereview.chromium.org/2775693003/)
> > >    - Disabling breakpad in windows (will fix in a separate CL)
> > >
> > >
> > > BUG=686608
> > >
> > > Review-Url: https://codereview.chromium.org/2762593002
> > > Cr-Commit-Position: refs/heads/master@{#466176}
> > > Committed: https://chromium.googlesource.com/chromium/src/+/e3c745d4b37a659afaa0358c7de7b9bc881decb5
> >
> > TBR=alexclarke@chromium.org,sky@chromium.org,skyostil@chromium.org,wfh@chromium.org,jzfeng@chromium.org,nick@chromium.org,dvallet@chromium.org
> > # Skipping CQ checks because original CL landed less than 1 days ago.
> > NOPRESUBMIT=true
> > NOTREECHECKS=true
> > NOTRY=true
> > BUG=686608
> >
> > Review-Url: https://codereview.chromium.org/2835603002
> > Cr-Commit-Position: refs/heads/master@{#466189}
> > Committed: https://chromium.googlesource.com/chromium/src/+/87a65c2fbb5db04ce025fadbfdfc7183003f6831
>
> TBR=nick@chromium.org,tdanderson@google.com,jzfeng@chromium.org,fhorschig@google.com,sky@chromium.org,keishi@google.com,xlai@google.com,alexclarke@chromium.org,skyostil@chromium.org,wfh@chromium.org,tdanderson@chromium.org,findit-for-me@appspot.gserviceaccount.com
> # Skipping CQ checks because original CL landed less than 1 days ago.
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> BUG=686608
>
> Review-Url: https://codereview.chromium.org/2832963002
> Cr-Commit-Position: refs/heads/master@{#466206}
> Committed: https://chromium.googlesource.com/chromium/src/+/e0800c0393765b299e3fcd81f2d97b8bbe997a2f

TBR=jzfeng@chromium.org,alexclarke@chromium.org,fhorschig@google.com,findit-for-me@appspot.gserviceaccount.com,keishi@google.com,nick@chromium.org,sky@chromium.org,skyostil@chromium.org,tdanderson@google.com,tdanderson@chromium.org,wfh@chromium.org,xlai@google.com,dvallet@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=686608

Review-Url: https://codereview.chromium.org/2828203003
Cr-Commit-Position: refs/heads/master@{#466214}

[modify] https://crrev.com/4f8bacc309f5ae27a5b2204231c6e59511f6bf42/chrome/BUILD.gn
[modify] https://crrev.com/4f8bacc309f5ae27a5b2204231c6e59511f6bf42/chrome/app/chrome_main.cc
[modify] https://crrev.com/4f8bacc309f5ae27a5b2204231c6e59511f6bf42/headless/BUILD.gn
[modify] https://crrev.com/4f8bacc309f5ae27a5b2204231c6e59511f6bf42/headless/DEPS
[modify] https://crrev.com/4f8bacc309f5ae27a5b2204231c6e59511f6bf42/headless/app/headless_example.cc
[modify] https://crrev.com/4f8bacc309f5ae27a5b2204231c6e59511f6bf42/headless/app/headless_shell.cc
[modify] https://crrev.com/4f8bacc309f5ae27a5b2204231c6e59511f6bf42/headless/app/headless_shell.h
[modify] https://crrev.com/4f8bacc309f5ae27a5b2204231c6e59511f6bf42/headless/app/headless_shell_main.cc
[modify] https://crrev.com/4f8bacc309f5ae27a5b2204231c6e59511f6bf42/headless/app/headless_shell_switches.cc
[modify] https://crrev.com/4f8bacc309f5ae27a5b2204231c6e59511f6bf42/headless/app/headless_shell_switches.h
[modify] https://crrev.com/4f8bacc309f5ae27a5b2204231c6e59511f6bf42/headless/lib/browser/DEPS
[modify] https://crrev.com/4f8bacc309f5ae27a5b2204231c6e59511f6bf42/headless/lib/browser/headless_browser_impl.cc
[modify] https://crrev.com/4f8bacc309f5ae27a5b2204231c6e59511f6bf42/headless/lib/headless_browser_browsertest.cc
[modify] https://crrev.com/4f8bacc309f5ae27a5b2204231c6e59511f6bf42/headless/lib/headless_content_main_delegate.cc
[modify] https://crrev.com/4f8bacc309f5ae27a5b2204231c6e59511f6bf42/headless/lib/headless_content_main_delegate.h
[modify] https://crrev.com/4f8bacc309f5ae27a5b2204231c6e59511f6bf42/headless/public/headless_browser.cc
[modify] https://crrev.com/4f8bacc309f5ae27a5b2204231c6e59511f6bf42/headless/public/headless_browser.h
[modify] https://crrev.com/4f8bacc309f5ae27a5b2204231c6e59511f6bf42/headless/public/headless_shell.h
[modify] https://crrev.com/4f8bacc309f5ae27a5b2204231c6e59511f6bf42/headless/public/util/deterministic_http_protocol_handler.cc
[modify] https://crrev.com/4f8bacc309f5ae27a5b2204231c6e59511f6bf42/headless/public/util/generic_url_request_job.h
[modify] https://crrev.com/4f8bacc309f5ae27a5b2204231c6e59511f6bf42/headless/public/util/testing/generic_url_request_mocks.cc
[modify] https://crrev.com/4f8bacc309f5ae27a5b2204231c6e59511f6bf42/headless/test/headless_browser_test.cc

Project Member Comment 11 by bugdroid1@chromium.org, Apr 21 2017
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/d238dae172d63175b562f99fc988e47e5213a244

commit d238dae172d63175b562f99fc988e47e5213a244
Author: dvallet <dvallet@chromium.org>
Date: Fri Apr 21 04:36:32 2017

Launch bug: https://bugs.chromium.org/p/chromium/issues/detail?id=705916

Add --headless flag to Windows:

Fix browser_tests not compiling properly on windows
Fix headless/BUILD.gn by:
   - Changing headless_lib to a headless component, following steps in https://chromium.googlesource.com/chromium/src/+/master/docs/component_build.md and fixing the build for linux, since it now compiles as a shared_library when component build is true.
   - Adding neccesary HEADLESS_EXPORT (submitted in https://codereview.chromium.org/2775693003/)
   - Disabling breakpad in windows (will fix in a separate CL)

BUG=686608

Review-Url: https://codereview.chromium.org/2762593002
Cr-Original-Commit-Position: refs/heads/master@{#466176}
Committed: https://chromium.googlesource.com/chromium/src/+/e3c745d4b37a659afaa0358c7de7b9bc881decb5
Review-Url: https://codereview.chromium.org/2762593002
Cr-Commit-Position: refs/heads/master@{#466259}

[modify] https://crrev.com/d238dae172d63175b562f99fc988e47e5213a244/chrome/BUILD.gn
[modify] https://crrev.com/d238dae172d63175b562f99fc988e47e5213a244/chrome/app/chrome_main.cc
[modify] https://crrev.com/d238dae172d63175b562f99fc988e47e5213a244/headless/BUILD.gn
[modify] https://crrev.com/d238dae172d63175b562f99fc988e47e5213a244/headless/DEPS
[modify] https://crrev.com/d238dae172d63175b562f99fc988e47e5213a244/headless/app/headless_example.cc
[modify] https://crrev.com/d238dae172d63175b562f99fc988e47e5213a244/headless/app/headless_shell.cc
[modify] https://crrev.com/d238dae172d63175b562f99fc988e47e5213a244/headless/app/headless_shell.h
[modify] https://crrev.com/d238dae172d63175b562f99fc988e47e5213a244/headless/app/headless_shell_main.cc
[modify] https://crrev.com/d238dae172d63175b562f99fc988e47e5213a244/headless/app/headless_shell_switches.cc
[modify] https://crrev.com/d238dae172d63175b562f99fc988e47e5213a244/headless/app/headless_shell_switches.h
[modify] https://crrev.com/d238dae172d63175b562f99fc988e47e5213a244/headless/lib/browser/DEPS
[modify] https://crrev.com/d238dae172d63175b562f99fc988e47e5213a244/headless/lib/browser/headless_browser_impl.cc
[modify] https://crrev.com/d238dae172d63175b562f99fc988e47e5213a244/headless/lib/headless_browser_browsertest.cc
[modify] https://crrev.com/d238dae172d63175b562f99fc988e47e5213a244/headless/lib/headless_content_main_delegate.cc
[modify] https://crrev.com/d238dae172d63175b562f99fc988e47e5213a244/headless/lib/headless_content_main_delegate.h
[modify] https://crrev.com/d238dae172d63175b562f99fc988e47e5213a244/headless/public/headless_browser.cc
[modify] https://crrev.com/d238dae172d63175b562f99fc988e47e5213a244/headless/public/headless_browser.h
[modify] https://crrev.com/d238dae172d63175b562f99fc988e47e5213a244/headless/public/headless_shell.h
[modify] https://crrev.com/d238dae172d63175b562f99fc988e47e5213a244/headless/public/util/deterministic_http_protocol_handler.cc
[modify] https://crrev.com/d238dae172d63175b562f99fc988e47e5213a244/headless/public/util/generic_url_request_job.h
[modify] https://crrev.com/d238dae172d63175b562f99fc988e47e5213a244/headless/public/util/testing/generic_url_request_mocks.cc
[modify] https://crrev.com/d238dae172d63175b562f99fc988e47e5213a244/headless/test/headless_browser_test.cc

Labels: Merge-Request-59
Project Member Comment 13 by sheriffbot@chromium.org, Apr 24 2017
Labels: -Merge-Request-59 Merge-Review-59 Hotlist-Merge-Review
This bug requires manual review: DEPS changes referenced in bugdroid comments.
Please contact the milestone owner if you have questions.
Owners: amineer@(Android), cmasso@(iOS), gkihumba@(ChromeOS), Abdul Syed@(Desktop)

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
We'd like to merge this feature to enable headless Chrome for Windows in 59. 

Headless Chrome launch has been approved for 59 in all platforms: https://bugs.chromium.org/p/chromium/issues/detail?id=705916

While Mac/Linux will be already release in 59, we'll need to cherry-pick the following commits to enable on Windows also: 
https://chromium.googlesource.com/chromium/src/+/d238dae172d63175b562f99fc988e47e5213a244
https://codereview.chromium.org/2839553002 (optional)

Note that Headless functionality is behind a --headless flag, so Chrome behavior is not affected (more info in launch bug)


Comment 15 by h...@chromium.org, Apr 24 2017
Looks like the commit in #11 grew chrome_child.dll with about 5MB or 10%, see https://codereview.chromium.org/2762593002/#msg178
Comment 16 by h...@chromium.org, Apr 24 2017
Blockedon: 714841
https://bugs.chromium.org/p/chromium/issues/detail?id=714841 for the size regression
Please add applicable OSs.
Thanks for noticing Hans, 
I moved the revert discussion to https://bugs.chromium.org/p/chromium/issues/detail?id=714841

Labels: OS-Windows
Project Member Comment 20 by bugdroid1@chromium.org, Apr 25 2017
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/4c5022c615824a6e2ad67db5eec5a093e3111e2d

commit 4c5022c615824a6e2ad67db5eec5a093e3111e2d
Author: dvallet <dvallet@chromium.org>
Date: Tue Apr 25 02:19:45 2017

Revert of Add --headless flag to Windows (patchset #29 id:560001 of https://codereview.chromium.org/2762593002/ )

Reason for revert:
Testing revert on --headless flag, due to increase in child_dll size: https://bugs.chromium.org/p/chromium/issues/detail?id=714841

Original issue's description:
> Launch bug: https://bugs.chromium.org/p/chromium/issues/detail?id=705916
>
> Add --headless flag to Windows:
>
> Fix browser_tests not compiling properly on windows
> Fix headless/BUILD.gn by:
>    - Changing headless_lib to a headless component, following steps in https://chromium.googlesource.com/chromium/src/+/master/docs/component_build.md and fixing the build for linux, since it now compiles as a shared_library when component build is true.
>    - Adding neccesary HEADLESS_EXPORT (submitted in https://codereview.chromium.org/2775693003/)
>    - Disabling breakpad in windows (will fix in a separate CL)
>
>
> BUG=686608
>
> Review-Url: https://codereview.chromium.org/2762593002
> Cr-Original-Commit-Position: refs/heads/master@{#466176}
> Committed: https://chromium.googlesource.com/chromium/src/+/e3c745d4b37a659afaa0358c7de7b9bc881decb5
> Review-Url: https://codereview.chromium.org/2762593002
> Cr-Commit-Position: refs/heads/master@{#466259}
> Committed: https://chromium.googlesource.com/chromium/src/+/d238dae172d63175b562f99fc988e47e5213a244

TBR=alexclarke@chromium.org,sky@chromium.org,skyostil@chromium.org,wfh@chromium.org,jzfeng@chromium.org,nick@chromium.org,hans@chromium.org
# Not skipping CQ checks because original CL landed more than 1 days ago.
BUG=686608

Review-Url: https://codereview.chromium.org/2837093003
Cr-Commit-Position: refs/heads/master@{#466871}

[modify] https://crrev.com/4c5022c615824a6e2ad67db5eec5a093e3111e2d/chrome/BUILD.gn
[modify] https://crrev.com/4c5022c615824a6e2ad67db5eec5a093e3111e2d/chrome/app/chrome_main.cc
[modify] https://crrev.com/4c5022c615824a6e2ad67db5eec5a093e3111e2d/headless/BUILD.gn
[modify] https://crrev.com/4c5022c615824a6e2ad67db5eec5a093e3111e2d/headless/DEPS
[modify] https://crrev.com/4c5022c615824a6e2ad67db5eec5a093e3111e2d/headless/app/headless_example.cc
[modify] https://crrev.com/4c5022c615824a6e2ad67db5eec5a093e3111e2d/headless/app/headless_shell.cc
[modify] https://crrev.com/4c5022c615824a6e2ad67db5eec5a093e3111e2d/headless/app/headless_shell.h
[modify] https://crrev.com/4c5022c615824a6e2ad67db5eec5a093e3111e2d/headless/app/headless_shell_main.cc
[modify] https://crrev.com/4c5022c615824a6e2ad67db5eec5a093e3111e2d/headless/app/headless_shell_switches.cc
[modify] https://crrev.com/4c5022c615824a6e2ad67db5eec5a093e3111e2d/headless/app/headless_shell_switches.h
[modify] https://crrev.com/4c5022c615824a6e2ad67db5eec5a093e3111e2d/headless/lib/browser/DEPS
[modify] https://crrev.com/4c5022c615824a6e2ad67db5eec5a093e3111e2d/headless/lib/browser/headless_browser_impl.cc
[modify] https://crrev.com/4c5022c615824a6e2ad67db5eec5a093e3111e2d/headless/lib/headless_browser_browsertest.cc
[modify] https://crrev.com/4c5022c615824a6e2ad67db5eec5a093e3111e2d/headless/lib/headless_content_main_delegate.cc
[modify] https://crrev.com/4c5022c615824a6e2ad67db5eec5a093e3111e2d/headless/lib/headless_content_main_delegate.h
[modify] https://crrev.com/4c5022c615824a6e2ad67db5eec5a093e3111e2d/headless/public/headless_browser.cc
[modify] https://crrev.com/4c5022c615824a6e2ad67db5eec5a093e3111e2d/headless/public/headless_browser.h
[modify] https://crrev.com/4c5022c615824a6e2ad67db5eec5a093e3111e2d/headless/public/headless_shell.h
[modify] https://crrev.com/4c5022c615824a6e2ad67db5eec5a093e3111e2d/headless/public/util/deterministic_http_protocol_handler.cc
[modify] https://crrev.com/4c5022c615824a6e2ad67db5eec5a093e3111e2d/headless/public/util/generic_url_request_job.h
[modify] https://crrev.com/4c5022c615824a6e2ad67db5eec5a093e3111e2d/headless/public/util/testing/generic_url_request_mocks.cc
[modify] https://crrev.com/4c5022c615824a6e2ad67db5eec5a093e3111e2d/headless/test/headless_browser_test.cc

Project Member Comment 21 by bugdroid1@chromium.org, Apr 25 2017
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/d349484bb4a27f342bed441b194f00a6451b2265

commit d349484bb4a27f342bed441b194f00a6451b2265
Author: dvallet <dvallet@chromium.org>
Date: Tue Apr 25 11:29:42 2017

Add fix on Mac 10.10 tests

BUG=686608

Review-Url: https://codereview.chromium.org/2840713003
Cr-Commit-Position: refs/heads/master@{#466943}

[modify] https://crrev.com/d349484bb4a27f342bed441b194f00a6451b2265/headless/lib/headless_content_main_delegate.cc

hi dvallet,

is there an easy way of telling when a new (headless) version of chrome is
available for testing?  the sub-version of v59 on the dev channel hadn't
changed for a while, the last time i checked.

Thanks.

-dh
dvallet@ - can you please confirm if this has been tested in canary, baked in for at least 24 hours? Is there enough test coverage for this change? I see a bunch of changes after comment 13, so can you please confirm what changes will be in this merge?
Current state is that --headless in Windows had to be reverted due to https://bugs.chromium.org/p/chromium/issues/detail?id=714841

I'm investigating how to decrease the size and see if I can reland the features. 

Unfortunately, this may mean Headless for Windows would not ship in v59, but I'll see if I can push it asap to the dev channel.
Does that mean you still need a merge? If this has not been fully tested yet on Canary or Dev, I recommend delaying it until M60 to ensure it goes through the full cycle. 
Labels: -Merge-Review-59 Merge-Review-60
Yes, apologies, this should be delayed to M60
hi dvallet,

i was flabbergasted today to see that chromium was now running headless.
eventually  i realized that i'd (automatically) upgraded to Version
60.0.3080.5 (Official Build) dev (64-bit), and apparently the headless
option is functional in that release (as comment 26 suggests).  i am using
the headless version to do some webscraping.  what i've found is that while
the headless version runs invisibly and apparently correctly, it fails to
download a PDF, but if i comment out the headless option it successfully
downloads the PDF.  i've attached the python script.

playWithSeleniumMinimzed.py is a reduced version of a larger program, so
there's some redundancy, but you will see that it basically prompts the
user for a choice of publisher.  the only valid choices in the minimized
version are '0', which will select elsevier as the publisher, and 'q',
which will terminate the program.  if you choose 0 as the input, you should
be able to get one PDF (on animal models of epilepsy) downloaded to the
directory 'dfd' (which you will need to change in the code) if you run in
normal mode.  but if you uncomment the line that adds 'headless', you will
see that chrome runs headlessly without a hitch, but does not download the
PDF, either to 'dfd' or to the normal default download directory.  the
verbose log is saved in the 'dfd' directory as well.  i have verified these
results both on windows 10 and windows 7, with python 3.5.

hopefully this will be helpful to you.  thanks for all your work.

-dh
re #27: thanks for the report! What you might describe may be related to headless chrome not supporting Downloads atm: https://bugs.chromium.org/p/chromium/issues/detail?id=696481

Feel free to add the details there (I think you forgot attaching the script). Another alternative is to send an email to headless-dev@chromium.org
hi dvallet,

i've had problems attaching files before, but it appeared to me that one had been attached this time.  i'll try again below.

in relation to your explanation, that makes sense.  but downloading is an important part of what i want to do with headless chrome.  is it currently planned for a specific release?

-dh
playWithSeleniumMinimized.py
2.7 KB View Download
hi dvallet,

the failure to download was precisely the issue i encountered, and #696481
explains the issues very clearly.  since it's a recognized issue, there's
probably no point in my attaching code that demonstrates it. it was unclear
when the option to download files in headless mode will be available,
though.  downloading is critical for my intended use case, so having it
available as an option at least is important (even if the default is to
turn it off).  any insights?

-dh
Hey David, I saw that you commented on the download bug, thanks for doing this!
I'm sure it will be dealt with, but first there's some work to specify the feature more clearly. Feel free to further comment there.

Hello,
as the blocker https://bugs.chromium.org/p/chromium/issues/detail?id=714841 seems to have been resolved, I kindly wanted to ask whether there is an update on when we can expect "--headless" for windows?
Project Member Comment 33 by bugdroid1@chromium.org, May 13
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/8303a91150b12ffda29e1d2d5e46dc1371730bfe

commit 8303a91150b12ffda29e1d2d5e46dc1371730bfe
Author: dvallet <dvallet@chromium.org>
Date: Sat May 13 01:18:11 2017

Launch bug: https://bugs.chromium.org/p/chromium/issues/detail?id=705916

Add --headless flag to Windows:

Fix browser_tests not compiling properly on windows
Fix headless/BUILD.gn by:
   - Changing headless_lib to a headless component, following steps in https://chromium.googlesource.com/chromium/src/+/master/docs/component_build.md and fixing the build for linux, since it now compiles as a shared_library when component build is true.
   - Adding neccesary HEADLESS_EXPORT (submitted in https://codereview.chromium.org/2775693003/)
   - Disabling breakpad in windows (will fix in a separate CL)

BUG=686608

Review-Url: https://codereview.chromium.org/2762593002
Cr-Original-Original-Commit-Position: refs/heads/master@{#466176}
Committed: https://chromium.googlesource.com/chromium/src/+/e3c745d4b37a659afaa0358c7de7b9bc881decb5
Review-Url: https://codereview.chromium.org/2762593002
Cr-Original-Commit-Position: refs/heads/master@{#466259}
Committed: https://chromium.googlesource.com/chromium/src/+/d238dae172d63175b562f99fc988e47e5213a244
Review-Url: https://codereview.chromium.org/2762593002
Cr-Commit-Position: refs/heads/master@{#471525}

[modify] https://crrev.com/8303a91150b12ffda29e1d2d5e46dc1371730bfe/chrome/BUILD.gn
[modify] https://crrev.com/8303a91150b12ffda29e1d2d5e46dc1371730bfe/chrome/app/chrome_main.cc
[modify] https://crrev.com/8303a91150b12ffda29e1d2d5e46dc1371730bfe/headless/BUILD.gn
[modify] https://crrev.com/8303a91150b12ffda29e1d2d5e46dc1371730bfe/headless/DEPS
[modify] https://crrev.com/8303a91150b12ffda29e1d2d5e46dc1371730bfe/headless/app/headless_example.cc
[modify] https://crrev.com/8303a91150b12ffda29e1d2d5e46dc1371730bfe/headless/app/headless_shell.cc
[modify] https://crrev.com/8303a91150b12ffda29e1d2d5e46dc1371730bfe/headless/app/headless_shell.h
[modify] https://crrev.com/8303a91150b12ffda29e1d2d5e46dc1371730bfe/headless/app/headless_shell_main.cc
[modify] https://crrev.com/8303a91150b12ffda29e1d2d5e46dc1371730bfe/headless/app/headless_shell_switches.cc
[modify] https://crrev.com/8303a91150b12ffda29e1d2d5e46dc1371730bfe/headless/app/headless_shell_switches.h
[modify] https://crrev.com/8303a91150b12ffda29e1d2d5e46dc1371730bfe/headless/lib/browser/DEPS
[modify] https://crrev.com/8303a91150b12ffda29e1d2d5e46dc1371730bfe/headless/lib/browser/headless_browser_impl.cc
[modify] https://crrev.com/8303a91150b12ffda29e1d2d5e46dc1371730bfe/headless/lib/browser/headless_devtools_manager_delegate.h
[modify] https://crrev.com/8303a91150b12ffda29e1d2d5e46dc1371730bfe/headless/lib/browser/headless_print_manager.cc
[modify] https://crrev.com/8303a91150b12ffda29e1d2d5e46dc1371730bfe/headless/lib/browser/headless_print_manager.h
[modify] https://crrev.com/8303a91150b12ffda29e1d2d5e46dc1371730bfe/headless/lib/browser/headless_printing_unittest.cc
[modify] https://crrev.com/8303a91150b12ffda29e1d2d5e46dc1371730bfe/headless/lib/browser/headless_web_contents_impl.cc
[modify] https://crrev.com/8303a91150b12ffda29e1d2d5e46dc1371730bfe/headless/lib/headless_browser_browsertest.cc
[modify] https://crrev.com/8303a91150b12ffda29e1d2d5e46dc1371730bfe/headless/lib/headless_content_main_delegate.cc
[modify] https://crrev.com/8303a91150b12ffda29e1d2d5e46dc1371730bfe/headless/lib/headless_content_main_delegate.h
[modify] https://crrev.com/8303a91150b12ffda29e1d2d5e46dc1371730bfe/headless/public/headless_browser.cc
[modify] https://crrev.com/8303a91150b12ffda29e1d2d5e46dc1371730bfe/headless/public/headless_browser.h
[modify] https://crrev.com/8303a91150b12ffda29e1d2d5e46dc1371730bfe/headless/public/headless_shell.h
[modify] https://crrev.com/8303a91150b12ffda29e1d2d5e46dc1371730bfe/headless/public/util/deterministic_http_protocol_handler.cc
[modify] https://crrev.com/8303a91150b12ffda29e1d2d5e46dc1371730bfe/headless/public/util/generic_url_request_job.h
[modify] https://crrev.com/8303a91150b12ffda29e1d2d5e46dc1371730bfe/headless/public/util/testing/generic_url_request_mocks.cc
[modify] https://crrev.com/8303a91150b12ffda29e1d2d5e46dc1371730bfe/headless/test/headless_browser_test.cc

hi dvallet,

when i look at chrome on my PC, i see it is 60.0.3095.5.  headless doesn't
work, which suggests that the changes described in C#33 are not yet
released.  is there an easy way to tell when changes mentioned in a comment
like C#33 are incorporated into a particular release of chrome?

thanks in advance.

-dh
You can use paste the git hash to omahaproxy.appspot.com to check which Chrome build includes the CL.

A CL roughly takes a day before ended up in Chrome Canary.
Components: Internals>Headless
Project Member Comment 37 by bugdroid1@chromium.org, May 16
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/266c2738a4fb94018caba538e308c60a44cb9646

commit 266c2738a4fb94018caba538e308c60a44cb9646
Author: dvallet <dvallet@chromium.org>
Date: Tue May 16 05:03:17 2017

Added crashpad support for Windows

This mimics behavior with Mac and Linux, with --enable-crash-reporter
--crash-dumps-dir in headless_shell and chrome --headless

Note that browsertests cannot be enabled as they are since in Windows the crash handler
is forked from the Headless Shell.

BUG=686608

Review-Url: https://codereview.chromium.org/2835913002
Cr-Commit-Position: refs/heads/master@{#472017}

[modify] https://crrev.com/266c2738a4fb94018caba538e308c60a44cb9646/headless/BUILD.gn
[modify] https://crrev.com/266c2738a4fb94018caba538e308c60a44cb9646/headless/app/headless_shell.cc
[modify] https://crrev.com/266c2738a4fb94018caba538e308c60a44cb9646/headless/lib/headless_content_main_delegate.cc

Project Member Comment 38 by bugdroid1@chromium.org, May 16
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/7bbfe9f60233e5bed915af951a960210c9c94cc2

commit 7bbfe9f60233e5bed915af951a960210c9c94cc2
Author: dvallet <dvallet@chromium.org>
Date: Tue May 16 05:41:13 2017

Add headless resources to Windows platform, now that's enabled
This patch adds headless resources (1.7 Kb) to all those versions
Launch bug: http://crbug.com/705916
BUG=686608

Review-Url: https://codereview.chromium.org/2839553002
Cr-Commit-Position: refs/heads/master@{#472022}

[modify] https://crrev.com/7bbfe9f60233e5bed915af951a960210c9c94cc2/chrome/chrome_paks.gni

Project Member Comment 39 by bugdroid1@chromium.org, May 16
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/386add8ced87b5b0c91d4f91b0f3e41be71c3d2c

commit 386add8ced87b5b0c91d4f91b0f3e41be71c3d2c
Author: dvallet <dvallet@chromium.org>
Date: Tue May 16 05:51:11 2017

Include headless tests in all swarm version for Windows, since it's been enabled
Also, increase tests version for Mac (previously enabled in https://codereview.chromium.org/2783053002)

BUG=686608

Review-Url: https://codereview.chromium.org/2841443002
Cr-Commit-Position: refs/heads/master@{#472023}

[modify] https://crrev.com/386add8ced87b5b0c91d4f91b0f3e41be71c3d2c/testing/buildbot/chromium.mac.json
[modify] https://crrev.com/386add8ced87b5b0c91d4f91b0f3e41be71c3d2c/testing/buildbot/chromium.win.json

Project Member Comment 40 by bugdroid1@chromium.org, May 16
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/c3ca8ada25a73ed77a68a85e09d990c2b99323bf

commit c3ca8ada25a73ed77a68a85e09d990c2b99323bf
Author: kolos <kolos@chromium.org>
Date: Tue May 16 08:23:26 2017

Revert of Include headless tests in all swarm version for Windows, since it's been enabled (patchset #2 id:20001 of https://codereview.chromium.org/2841443002/ )

Reason for revert:
This CL broke some Mac tests
https://build.chromium.org/p/chromium.mac/builders/Mac10.9%20Tests%20%28dbg%29/builds/40547
https://build.chromium.org/p/chromium.mac/builders/Mac10.9%20Tests%20%28dbg%29/builds/40547

FindIt report: https://findit-for-me.appspot.com/waterfall/build-failure?url=https://build.chromium.org/p/chromium.mac/builders/Mac10.9%20Tests%20%28dbg%29/builds/40547

Original issue's description:
> Include headless tests in all swarm version for Windows, since it's been enabled
> Also, increase tests version for Mac (previously enabled in https://codereview.chromium.org/2783053002)
>
> BUG=686608
>
> Review-Url: https://codereview.chromium.org/2841443002
> Cr-Commit-Position: refs/heads/master@{#472023}
> Committed: https://chromium.googlesource.com/chromium/src/+/386add8ced87b5b0c91d4f91b0f3e41be71c3d2c

TBR=dpranke@chromium.org,skyostil@chromium.org,dvallet@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=686608

Review-Url: https://codereview.chromium.org/2887663002
Cr-Commit-Position: refs/heads/master@{#472041}

[modify] https://crrev.com/c3ca8ada25a73ed77a68a85e09d990c2b99323bf/testing/buildbot/chromium.mac.json
[modify] https://crrev.com/c3ca8ada25a73ed77a68a85e09d990c2b99323bf/testing/buildbot/chromium.win.json

Project Member Comment 41 by bugdroid1@chromium.org, May 22
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/5cca5ec7822a8d5594a6711b6040c90430b1772e

commit 5cca5ec7822a8d5594a6711b6040c90430b1772e
Author: dvallet <dvallet@chromium.org>
Date: Mon May 22 02:36:10 2017

Add specific headless_shell_win.cc and headless_content_main_delegate_win.cc
For Windows component builds

BUG=686608

Review-Url: https://codereview.chromium.org/2887033003
Cr-Commit-Position: refs/heads/master@{#473494}

[modify] https://crrev.com/5cca5ec7822a8d5594a6711b6040c90430b1772e/headless/BUILD.gn
[modify] https://crrev.com/5cca5ec7822a8d5594a6711b6040c90430b1772e/headless/app/headless_shell.cc
[modify] https://crrev.com/5cca5ec7822a8d5594a6711b6040c90430b1772e/headless/app/headless_shell.h
[add] https://crrev.com/5cca5ec7822a8d5594a6711b6040c90430b1772e/headless/app/headless_shell_win.cc
[modify] https://crrev.com/5cca5ec7822a8d5594a6711b6040c90430b1772e/headless/lib/headless_content_main_delegate.cc
[add] https://crrev.com/5cca5ec7822a8d5594a6711b6040c90430b1772e/headless/lib/headless_content_main_delegate_win.cc

Project Member Comment 42 by bugdroid1@chromium.org, May 22
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/722473f6b681bad4dd6dd5897d281339c81efe93

commit 722473f6b681bad4dd6dd5897d281339c81efe93
Author: dvallet <dvallet@chromium.org>
Date: Mon May 22 07:13:05 2017

Add specific headless_shell_win.cc and headless_content_main_delegate_win.cc
For Windows component builds

BUG=686608

Review-Url: https://codereview.chromium.org/2887033003
Cr-Original-Commit-Position: refs/heads/master@{#473494}
Committed: https://chromium.googlesource.com/chromium/src/+/5cca5ec7822a8d5594a6711b6040c90430b1772e
Review-Url: https://codereview.chromium.org/2887033003
Cr-Commit-Position: refs/heads/master@{#473517}

[modify] https://crrev.com/722473f6b681bad4dd6dd5897d281339c81efe93/headless/lib/headless_content_main_delegate.cc

hi dvallet,

i'm finding that the current dev version of chromium (60.0.3107.4) still
doesn't download files properly in headless mode, although it works fine in
the visible mode.  when i run code with the headless option commented out,
i am able to download a file, after navigating to a specific button, with
the code:

btns = driver.find_elements_by_id("pdfLink")
driver.get(btns[0].get_attribute('href'))
time.sleep(15),

a file is downloaded properly to the default directory, using the options
set by these lines:

options = webdriver.ChromeOptions()

prefs = {"download.default_directory": dfd,
"plugins.always_open_pdf_externally": True,
         "disable-extensions": True, "download.prompt_for_download": False,
"download.directory_upgrade": True}
options.add_experimental_option("prefs", prefs)
#options.add_argument("headless") -- commented out
options.add_argument("disable-infobars")
driver = webdriver.Chrome(chrome_options = options)

when i change the single line required to start headless by removing the #
at the beginning, i find that the navigation works OK; btns[0].get('href')
contains the proper URL for the file i'm trying to download, but
driver.get(btns[0].get_attribute('href')) no longer works -- nothing is
downloaded.

i'm attaching the whole program (it uses selenium and chromedriver).  i've
had problems attaching files in the past, so let me know if you can read it.

i'm baffled.  is this a problem with chrome, or with chromedriver, or
something else?

thanks in advance.
-dh
#43 - please, file a different issue for it, or ask in the group. This issue is not the right place for reporting specific headless issues.
#43 that looks related to http://crbug.com/696481
Status: Fixed
I'm going to close this bug, feel free to open new issues if you find any regarding Windows headless

I've written a Doc summarizing the changes and troubleshooting problems for Headless in windows: https://docs.google.com/a/chromium.org/document/d/12c3bSEbmpeGevuyFHcvEKw9br6CkFJSS2saQynBjIzE
Project Member Comment 47 by bugdroid1@chromium.org, May 26
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/3d53e52c1841c3f52f037ae57cf83ebb7ef13ecb

commit 3d53e52c1841c3f52f037ae57cf83ebb7ef13ecb
Author: dvallet <dvallet@chromium.org>
Date: Fri May 26 06:16:15 2017

Include headless tests in all swarm version for Windows, since it's been enabled
Also, increase tests version for Mac (previously enabled in https://codereview.chromium.org/2783053002)

BUG=686608

Review-Url: https://codereview.chromium.org/2841443002
Cr-Original-Commit-Position: refs/heads/master@{#472023}
Committed: https://chromium.googlesource.com/chromium/src/+/386add8ced87b5b0c91d4f91b0f3e41be71c3d2c
Review-Url: https://codereview.chromium.org/2841443002
Cr-Commit-Position: refs/heads/master@{#474937}

[modify] https://crrev.com/3d53e52c1841c3f52f037ae57cf83ebb7ef13ecb/testing/buildbot/chromium.mac.json
[modify] https://crrev.com/3d53e52c1841c3f52f037ae57cf83ebb7ef13ecb/testing/buildbot/chromium.win.json

Somewhat confused with the activity here. Does this mean it's now fixed and shipped with latest Chrome? On stable? Canary?
Unless it is merged (you will see merge comments), "Fixed" generally means it is fixed on trunk. That means it will be fixed in the next canary and over time, in the respective release channel.
Project Member Comment 50 by bugdroid1@chromium.org, May 31
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/80f56cf72e6a9d5f0f632da8925fcc8f26b1a9e2

commit 80f56cf72e6a9d5f0f632da8925fcc8f26b1a9e2
Author: dvallet <dvallet@chromium.org>
Date: Wed May 31 00:17:03 2017

Fix nit in comment

BUG=686608

Review-Url: https://codereview.chromium.org/2897113005
Cr-Commit-Position: refs/heads/master@{#475701}

[modify] https://crrev.com/80f56cf72e6a9d5f0f632da8925fcc8f26b1a9e2/headless/lib/headless_content_main_delegate.cc

It seems to be partially working on Windows in 59.0.3071.86. I get a blank UI shell, but unit tests (Karma) can run successfully. 

However, things like --dom-dom and --screenshot do not seem to be functional yet.
#51 - The last commit that fixed this issue landed in Chrome 60.0.3108.0 which currently corresponds to the latest Dev build at 60.0.3112.20/.21.

Source: https://storage.googleapis.com/chromium-find-releases-static/722.html#722473f6b681bad4dd6dd5897d281339c81efe93
Labels: -Merge-Review-60
It looks like the Merge-Review-60 label got added before M60 was actually branched on 5/26.  Removing it for now, if there are changes that you want merged into the branch, feel free to add it back and along with the CL's to review.
Comment 54 Deleted
Sign in to add a comment