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

Unified Diff: chrome/renderer/mock_printer.cc

Issue 7831041: Fix print preview workflow to reflect settings of selected printer. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Update per code review Created 9 years, 3 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 | « chrome/browser/resources/print_preview/print_preview.js ('k') | chrome/renderer/print_web_view_helper.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/renderer/mock_printer.cc
diff --git a/chrome/renderer/mock_printer.cc b/chrome/renderer/mock_printer.cc
index 9a5d2f44eeb4164068243395a05df74402869c51..869e742a1423640d660235622deaf83402854136 100644
--- a/chrome/renderer/mock_printer.cc
+++ b/chrome/renderer/mock_printer.cc
@@ -123,8 +123,9 @@ void MockPrinter::ScriptedPrint(int cookie,
void MockPrinter::UpdateSettings(int cookie,
PrintMsg_PrintPages_Params* params,
const std::vector<int>& pages) {
- EXPECT_EQ(document_cookie_, cookie);
-
+ if (document_cookie_ == -1) {
+ document_cookie_ = CreateDocumentCookie();
+ }
params->Reset();
params->pages = pages;
SetPrintParams(&(params->params));
« no previous file with comments | « chrome/browser/resources/print_preview/print_preview.js ('k') | chrome/renderer/print_web_view_helper.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698