summaryrefslogtreecommitdiffstats
path: root/chrome/renderer/mock_printer.cc
diff options
context:
space:
mode:
authorkmadhusu@chromium.org <kmadhusu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-03-15 21:05:42 +0000
committerkmadhusu@chromium.org <kmadhusu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-03-15 21:05:42 +0000
commitafbdd164e2cc5babc0fc8b8574c5b95d4a818b78 (patch)
tree215f033fc2c1895041097ae28af75c9a1fd17605 /chrome/renderer/mock_printer.cc
parente76a3631b7ea17e6514f6d5a13ebafb423b6c199 (diff)
downloadchromium_src-afbdd164e2cc5babc0fc8b8574c5b95d4a818b78.zip
chromium_src-afbdd164e2cc5babc0fc8b8574c5b95d4a818b78.tar.gz
chromium_src-afbdd164e2cc5babc0fc8b8574c5b95d4a818b78.tar.bz2
PrintPreview: Modify PrintMsg_Print_Params data validation check.
BUG=117323 TEST=None Review URL: http://codereview.chromium.org/9677034 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@126991 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/renderer/mock_printer.cc')
-rw-r--r--chrome/renderer/mock_printer.cc10
1 files changed, 9 insertions, 1 deletions
diff --git a/chrome/renderer/mock_printer.cc b/chrome/renderer/mock_printer.cc
index 8546d61..949e588 100644
--- a/chrome/renderer/mock_printer.cc
+++ b/chrome/renderer/mock_printer.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -123,6 +123,14 @@ void MockPrinter::UseInvalidSettings() {
SetDefaultPrintSettings(empty_param);
}
+void MockPrinter::UseInvalidPageSize() {
+ page_size_.SetSize(0, 0);
+}
+
+void MockPrinter::UseInvalidContentSize() {
+ content_size_.SetSize(0, 0);
+}
+
void MockPrinter::ScriptedPrint(int cookie,
int expected_pages_count,
bool has_selection,