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

Issue 2035733002: headless: Implement screenshot capturing (Closed)

Created:
4 years, 6 months ago by Eric Seckler
Modified:
4 years, 6 months ago
Reviewers:
Sami
CC:
chromium-reviews
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

headless: Implement screenshot capturing (based on patch from skyostil@, also sets default window size to 800x600 to enable basic snapshot support) With the --screenshot option, headless shell will save a PNG screenshot of the loaded page. patch from issue 2000723002 at patchset 1 (http://crrev.com/2000723002#ps1) BUG=546953 Committed: https://crrev.com/9ef54766bc24bdeff0fec0a8df5540feb691cfc9 Cr-Commit-Position: refs/heads/master@{#397743}

Patch Set 1 #

Total comments: 5

Patch Set 2 : Add a test for screenshotting functionality. #

Total comments: 4

Patch Set 3 : Move async test, write screenshot to file. #

Total comments: 14

Patch Set 4 : Addresses reviewer comments. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+200 lines, -2 lines) Patch
M headless/app/headless_shell.cc View 1 2 3 7 chunks +90 lines, -0 lines 0 comments Download
M headless/app/headless_shell_switches.h View 1 chunk +1 line, -0 lines 0 comments Download
M headless/app/headless_shell_switches.cc View 1 chunk +3 lines, -0 lines 0 comments Download
M headless/lib/browser/headless_browser_impl.h View 1 2 3 chunks +4 lines, -0 lines 0 comments Download
M headless/lib/browser/headless_browser_impl.cc View 1 2 3 chunks +12 lines, -1 line 0 comments Download
M headless/lib/headless_devtools_client_browsertest.cc View 1 2 3 1 chunk +2 lines, -0 lines 0 comments Download
M headless/lib/headless_web_contents_browsertest.cc View 1 2 3 chunks +24 lines, -0 lines 0 comments Download
M headless/public/headless_browser.h View 1 2 2 chunks +5 lines, -0 lines 0 comments Download
M headless/test/headless_browser_test.h View 1 2 3 chunks +32 lines, -1 line 0 comments Download
M headless/test/headless_browser_test.cc View 1 2 3 2 chunks +27 lines, -0 lines 0 comments Download

Depends on Patchset:

Messages

Total messages: 21 (8 generated)
Eric Seckler
4 years, 6 months ago (2016-06-02 14:21:48 UTC) #3
Sami
Thanks for tracking this down. Would you mind adding a HeadlessWebContentsTest that keeps this working? ...
4 years, 6 months ago (2016-06-02 14:22:19 UTC) #5
Eric Seckler
Thanks, Sami :) Here's a first attempt at the test. I'll look into writing decoded ...
4 years, 6 months ago (2016-06-02 17:56:32 UTC) #6
Sami
Looks great. I agree that we should factor out the async test base to a ...
4 years, 6 months ago (2016-06-02 18:01:33 UTC) #7
Eric Seckler
Thanks, I moved the async test to a reusable place. We can remove the DevToolsClientTest ...
4 years, 6 months ago (2016-06-03 11:30:40 UTC) #8
Sami
https://codereview.chromium.org/2035733002/diff/40001/headless/app/headless_shell.cc File headless/app/headless_shell.cc (right): https://codereview.chromium.org/2035733002/diff/40001/headless/app/headless_shell.cc#newcode54 headless/app/headless_shell.cc:54: screenshot_file_stream_(nullptr) {} No need to initialize a unique_ptr. The ...
4 years, 6 months ago (2016-06-03 11:46:25 UTC) #9
Eric Seckler
Thanks Sami, PTAL :) https://codereview.chromium.org/2035733002/diff/40001/headless/app/headless_shell.cc File headless/app/headless_shell.cc (right): https://codereview.chromium.org/2035733002/diff/40001/headless/app/headless_shell.cc#newcode54 headless/app/headless_shell.cc:54: screenshot_file_stream_(nullptr) {} On 2016/06/03 at ...
4 years, 6 months ago (2016-06-03 13:40:38 UTC) #10
Sami
Great, lgtm!
4 years, 6 months ago (2016-06-03 15:14:42 UTC) #11
Sami
By the way, I think we had a bug opened for this. Could you link ...
4 years, 6 months ago (2016-06-03 15:15:22 UTC) #12
commit-bot: I haz the power
This CL has an open dependency (Issue 2000723002 Patch 1). Please resolve the dependency and ...
4 years, 6 months ago (2016-06-03 16:08:09 UTC) #16
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2035733002/60001
4 years, 6 months ago (2016-06-03 16:33:08 UTC) #18
commit-bot: I haz the power
Committed patchset #4 (id:60001)
4 years, 6 months ago (2016-06-03 17:28:57 UTC) #19
commit-bot: I haz the power
4 years, 6 months ago (2016-06-03 17:30:44 UTC) #21
Message was sent while issue was closed.
Patchset 4 (id:??) landed as
https://crrev.com/9ef54766bc24bdeff0fec0a8df5540feb691cfc9
Cr-Commit-Position: refs/heads/master@{#397743}

Powered by Google App Engine
This is Rietveld 408576698