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

Unified Diff: chrome/browser/printing/print_preview_pdf_generated_browsertest.cc

Issue 431403002: Print Preview end to end browser test uses correct DPI when converting PDF to PNG. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/printing/print_preview_pdf_generated_browsertest.cc
diff --git a/chrome/browser/printing/print_preview_pdf_generated_browsertest.cc b/chrome/browser/printing/print_preview_pdf_generated_browsertest.cc
index 72dad06ffdbe239c886b900fc4b963feba375d5e..c583246082ae17a1975903c0558013c287bced16 100644
--- a/chrome/browser/printing/print_preview_pdf_generated_browsertest.cc
+++ b/chrome/browser/printing/print_preview_pdf_generated_browsertest.cc
@@ -368,7 +368,7 @@ class PrintPreviewPdfGeneratedBrowserTest : public InProcessBrowserTest {
ASSERT_GT(num_pages, 0);
double max_width_in_pixels =
- ConvertPointsToPixelDouble(max_width_in_points);
+ ConvertUnitDouble(max_width_in_points, kPointsPerInch, kDpi);
for (int i = 0; i < num_pages; ++i) {
double width_in_points, height_in_points;
@@ -378,8 +378,10 @@ class PrintPreviewPdfGeneratedBrowserTest : public InProcessBrowserTest {
&width_in_points,
&height_in_points));
- double width_in_pixels = ConvertPointsToPixelDouble(width_in_points);
- double height_in_pixels = ConvertPointsToPixelDouble(height_in_points);
+ double width_in_pixels = ConvertUnitDouble(
+ width_in_points, kPointsPerInch, kDpi);
+ double height_in_pixels = ConvertUnitDouble(
+ height_in_points, kPointsPerInch, kDpi);
// The image will be rotated if |width_in_pixels| is greater than
// |height_in_pixels|. This is because the page will be rotated to fit
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698