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

Issue 383623002: Add a browser test that can communicate with the layout test framework and print pdfs. (Closed)

Created:
6 years, 5 months ago by ivandavid
Modified:
6 years, 5 months ago
Reviewers:
Lei Zhang, Dan Beam
CC:
chromium-reviews
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Project:
chromium
Visibility:
Public.

Description

The browser test can print webpages to PDFs, then convert those PDFs to PNGs and send them to the layout test framework for an image diff. This is for print preview end to end testing. BUG=388517 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=284219

Patch Set 1 #

Patch Set 2 : Fixed typos, added overflow detection, rewrote poorly written comments. #

Total comments: 57

Patch Set 3 : Refactored FillPng(), rewrote comments, fixed typos, rewrote overflow checking. #

Patch Set 4 : Browsertest uses strings that are compatible with Windows. #

Patch Set 5 : Browsertest now works on Windows and Mac. #

Total comments: 42

Patch Set 6 : Rewrote FillPng, fixed typos and comments, and now check to see if PDF file exists. #

Patch Set 7 : base::FilePath now forward declared and unnecessary parameters removed for SetSelectedFileForTesting. #

Total comments: 4

Patch Set 8 : Rewrote FillPng. Fixed typos and comments. Code checks to see if the PDF file exists before attempting to read. #

Total comments: 47

Patch Set 9 : Fixed variable typo. #

Patch Set 10 : Rewrote comments. Renamed variables to better reflect what they represent. Removed excess headers . Removed 'for' loop when printing png. #

Total comments: 4

Patch Set 11 : Removed assert as it was unnecessary, added comments about |tmp_dir_| and |kColorByte|. #

Patch Set 12 : Fixed grammar in a comment. #

Patch Set 13 : Added the keyword 'virtual' to overriden functions for combatibility with clang. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+733 lines, -1 line) Patch
A chrome/browser/printing/print_preview_pdf_generated_browsertest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +718 lines, -0 lines 0 comments Download
M chrome/browser/ui/webui/print_preview/print_preview_handler.h View 1 chunk +3 lines, -0 lines 0 comments Download
M chrome/browser/ui/webui/print_preview/print_preview_ui.h View 1 2 3 4 5 6 7 2 chunks +5 lines, -0 lines 0 comments Download
M chrome/browser/ui/webui/print_preview/print_preview_ui.cc View 1 2 3 4 5 6 7 1 chunk +4 lines, -0 lines 0 comments Download
M chrome/chrome_tests.gypi View 2 chunks +2 lines, -0 lines 0 comments Download
M printing/units.h View 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 18 (0 generated)
ivandavid
I made another issue for all the browser test code because I realized that if ...
6 years, 5 months ago (2014-07-11 02:46:53 UTC) #1
Lei Zhang
https://codereview.chromium.org/383623002/diff/20001/chrome/browser/printing/print_preview_pdf_generated_browsertest.cc File chrome/browser/printing/print_preview_pdf_generated_browsertest.cc (right): https://codereview.chromium.org/383623002/diff/20001/chrome/browser/printing/print_preview_pdf_generated_browsertest.cc#newcode57 chrome/browser/printing/print_preview_pdf_generated_browsertest.cc:57: #include "ipc/ipc_message_macros.h" this should be in alphabetical order https://codereview.chromium.org/383623002/diff/20001/chrome/browser/printing/print_preview_pdf_generated_browsertest.cc#newcode61 ...
6 years, 5 months ago (2014-07-11 04:15:08 UTC) #2
ivandavid
https://codereview.chromium.org/383623002/diff/20001/chrome/browser/printing/print_preview_pdf_generated_browsertest.cc File chrome/browser/printing/print_preview_pdf_generated_browsertest.cc (right): https://codereview.chromium.org/383623002/diff/20001/chrome/browser/printing/print_preview_pdf_generated_browsertest.cc#newcode57 chrome/browser/printing/print_preview_pdf_generated_browsertest.cc:57: #include "ipc/ipc_message_macros.h" On 2014/07/11 04:15:07, Lei Zhang wrote: > ...
6 years, 5 months ago (2014-07-16 20:06:34 UTC) #3
Lei Zhang
https://codereview.chromium.org/383623002/diff/20001/chrome/browser/printing/print_preview_pdf_generated_browsertest.cc File chrome/browser/printing/print_preview_pdf_generated_browsertest.cc (right): https://codereview.chromium.org/383623002/diff/20001/chrome/browser/printing/print_preview_pdf_generated_browsertest.cc#newcode450 chrome/browser/printing/print_preview_pdf_generated_browsertest.cc:450: for (int i = 0; i < height; ++i, ...
6 years, 5 months ago (2014-07-17 00:30:37 UTC) #4
ivandavid
https://codereview.chromium.org/383623002/diff/120001/chrome/browser/printing/print_preview_pdf_generated_browsertest.cc File chrome/browser/printing/print_preview_pdf_generated_browsertest.cc (right): https://codereview.chromium.org/383623002/diff/120001/chrome/browser/printing/print_preview_pdf_generated_browsertest.cc#newcode14 chrome/browser/printing/print_preview_pdf_generated_browsertest.cc:14: #if defined(OS_WIN) On 2014/07/17 00:30:37, Lei Zhang wrote: > ...
6 years, 5 months ago (2014-07-17 20:49:21 UTC) #5
Lei Zhang
https://codereview.chromium.org/383623002/diff/120001/chrome/browser/printing/print_preview_pdf_generated_browsertest.cc File chrome/browser/printing/print_preview_pdf_generated_browsertest.cc (right): https://codereview.chromium.org/383623002/diff/120001/chrome/browser/printing/print_preview_pdf_generated_browsertest.cc#newcode281 chrome/browser/printing/print_preview_pdf_generated_browsertest.cc:281: // The web ui deallocates the memory for the ...
6 years, 5 months ago (2014-07-17 21:08:17 UTC) #6
ivandavid
Sorry about that. I checked out another branch without committing my code, causing me to ...
6 years, 5 months ago (2014-07-17 22:27:47 UTC) #7
Lei Zhang
https://codereview.chromium.org/383623002/diff/120001/chrome/browser/printing/print_preview_pdf_generated_browsertest.cc File chrome/browser/printing/print_preview_pdf_generated_browsertest.cc (right): https://codereview.chromium.org/383623002/diff/120001/chrome/browser/printing/print_preview_pdf_generated_browsertest.cc#newcode545 chrome/browser/printing/print_preview_pdf_generated_browsertest.cc:545: std::ifstream* in = new std::ifstream(tmp_path.value().c_str()); On 2014/07/17 20:49:19, ivandavid ...
6 years, 5 months ago (2014-07-17 23:31:07 UTC) #8
ivandavid
https://codereview.chromium.org/383623002/diff/260001/chrome/browser/printing/print_preview_pdf_generated_browsertest.cc File chrome/browser/printing/print_preview_pdf_generated_browsertest.cc (right): https://codereview.chromium.org/383623002/diff/260001/chrome/browser/printing/print_preview_pdf_generated_browsertest.cc#newcode105 chrome/browser/printing/print_preview_pdf_generated_browsertest.cc:105: bool is_already_pdf) On 2014/07/17 23:31:05, Lei Zhang wrote: > ...
6 years, 5 months ago (2014-07-18 01:59:11 UTC) #9
Lei Zhang
lgtm with just a few more small details. https://codereview.chromium.org/383623002/diff/260001/chrome/browser/printing/print_preview_pdf_generated_browsertest.cc File chrome/browser/printing/print_preview_pdf_generated_browsertest.cc (right): https://codereview.chromium.org/383623002/diff/260001/chrome/browser/printing/print_preview_pdf_generated_browsertest.cc#newcode547 chrome/browser/printing/print_preview_pdf_generated_browsertest.cc:547: ASSERT_TRUE(tmp_dir_.CreateUniqueTempDir()); ...
6 years, 5 months ago (2014-07-18 02:11:01 UTC) #10
ivandavid
https://codereview.chromium.org/383623002/diff/260001/chrome/browser/printing/print_preview_pdf_generated_browsertest.cc File chrome/browser/printing/print_preview_pdf_generated_browsertest.cc (right): https://codereview.chromium.org/383623002/diff/260001/chrome/browser/printing/print_preview_pdf_generated_browsertest.cc#newcode547 chrome/browser/printing/print_preview_pdf_generated_browsertest.cc:547: ASSERT_TRUE(tmp_dir_.CreateUniqueTempDir()); On 2014/07/18 02:11:01, Lei Zhang wrote: > On ...
6 years, 5 months ago (2014-07-18 02:30:26 UTC) #11
ivandavid
The CQ bit was checked by ivandavid@chromium.org
6 years, 5 months ago (2014-07-18 03:03:52 UTC) #12
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/ivandavid@chromium.org/383623002/360001
6 years, 5 months ago (2014-07-18 03:06:03 UTC) #13
ivandavid
The CQ bit was unchecked by ivandavid@chromium.org
6 years, 5 months ago (2014-07-18 03:26:40 UTC) #14
ivandavid
The CQ bit was checked by ivandavid@chromium.org
6 years, 5 months ago (2014-07-18 19:24:36 UTC) #15
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/ivandavid@chromium.org/383623002/380001
6 years, 5 months ago (2014-07-18 19:26:10 UTC) #16
commit-bot: I haz the power
Change committed as 284219
6 years, 5 months ago (2014-07-18 22:18:04 UTC) #17
Dan Beam
6 years, 5 months ago (2014-07-21 17:25:31 UTC) #18
Message was sent while issue was closed.
was i supposed to review anything here?

Powered by Google App Engine
This is Rietveld 408576698