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

Side by Side Diff: chrome/renderer/print_web_view_helper_browsertest.cc

Issue 8585017: PrintPreview: Honor the print media page size and margin values. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix win and mac issues Created 8 years, 11 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "chrome/common/chrome_switches.h" 5 #include "chrome/common/chrome_switches.h"
6 #include "chrome/common/print_messages.h" 6 #include "chrome/common/print_messages.h"
7 #include "chrome/renderer/print_web_view_helper.h" 7 #include "chrome/renderer/print_web_view_helper.h"
8 #include "chrome/test/base/chrome_render_view_test.h" 8 #include "chrome/test/base/chrome_render_view_test.h"
9 #include "content/public/renderer/render_view.h" 9 #include "content/public/renderer/render_view.h"
10 #include "printing/print_job_constants.h" 10 #include "printing/print_job_constants.h"
(...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after
235 " http-equiv=\"Content-Type\"" 235 " http-equiv=\"Content-Type\""
236 " content=\"text/html; charset=utf-8\"/>" 236 " content=\"text/html; charset=utf-8\"/>"
237 "<title>Test 1</title>" 237 "<title>Test 1</title>"
238 "</head>" 238 "</head>"
239 "<body style=\"background-color: white;\">" 239 "<body style=\"background-color: white;\">"
240 "<p style=\"font-family: arial;\">Hello World!</p>" 240 "<p style=\"font-family: arial;\">Hello World!</p>"
241 "</body>", 241 "</body>",
242 #if defined(OS_MACOSX) 242 #if defined(OS_MACOSX)
243 // Mac printing code compensates for the WebKit scale factor while generating 243 // Mac printing code compensates for the WebKit scale factor while generating
244 // the metafile, so we expect smaller pages. 244 // the metafile, so we expect smaller pages.
245 1, 540, 720, 245 1, 600, 780,
246 #else 246 #else
247 1, 675, 900, 247 1, 675, 900,
248 #endif 248 #endif
249 NULL, 249 NULL,
250 NULL, 250 NULL,
251 }, 251 },
252 }; 252 };
253 } // namespace 253 } // namespace
254 254
255 // TODO(estade): need to port MockPrinter to get this on Linux. This involves 255 // TODO(estade): need to port MockPrinter to get this on Linux. This involves
(...skipping 280 matching lines...) Expand 10 before | Expand all | Expand 10 after
536 // Fill in some dummy values. 536 // Fill in some dummy values.
537 DictionaryValue dict; 537 DictionaryValue dict;
538 CreatePrintSettingsDictionary(&dict); 538 CreatePrintSettingsDictionary(&dict);
539 OnPrintForPrintPreview(dict); 539 OnPrintForPrintPreview(dict);
540 540
541 VerifyPrintFailed(true); 541 VerifyPrintFailed(true);
542 VerifyPagesPrinted(false); 542 VerifyPagesPrinted(false);
543 } 543 }
544 544
545 #endif // !defined(OS_CHROMEOS) 545 #endif // !defined(OS_CHROMEOS)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698