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

Unified Diff: chrome/renderer/mock_printer.cc

Issue 7740005: Print preview not showing if default print is invalid. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Update per code review Created 9 years, 4 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
Index: chrome/renderer/mock_printer.cc
diff --git a/chrome/renderer/mock_printer.cc b/chrome/renderer/mock_printer.cc
index 3d1455911d9628cff9cc4550ee3ee14aa29ef782..6b639edcc238efd73b014586fa8dd61b9260f0c3 100644
--- a/chrome/renderer/mock_printer.cc
+++ b/chrome/renderer/mock_printer.cc
@@ -87,6 +87,10 @@ void MockPrinter::SetDefaultPrintSettings(const PrintMsg_Print_Params& params) {
url_ = params.url;
}
+void MockPrinter::SetBadSettings(bool be_evil) {
kmadhusu 2011/08/26 18:50:40 How about UseInvalidSettings()? This function will
arthurhsu 2011/08/29 22:53:16 Added a value in parameter, since we need to flip
+ evil_ = be_evil;
+}
+
void MockPrinter::ScriptedPrint(int cookie,
int expected_pages_count,
bool has_selection,
@@ -236,7 +240,7 @@ bool MockPrinter::SaveBitmap(
}
int MockPrinter::CreateDocumentCookie() {
- return ++current_document_cookie_;
+ return evil_ ? 0 : ++current_document_cookie_;
kmadhusu 2011/08/26 18:50:40 document_cookie is not a printer setting. So its b
arthurhsu 2011/08/29 22:53:16 It is used to determine if the printer settings is
}
void MockPrinter::SetPrintParams(PrintMsg_Print_Params* params) {

Powered by Google App Engine
This is Rietveld 408576698