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

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

Issue 8312003: When printing a PDF, query and use the print scaling disabled option. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: indent Created 9 years, 2 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
« no previous file with comments | « chrome/renderer/print_web_view_helper.cc ('k') | printing/print_job_constants.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 dict->SetBoolean(printing::kSettingCollate, false); 43 dict->SetBoolean(printing::kSettingCollate, false);
44 dict->SetInteger(printing::kSettingColor, printing::GRAY); 44 dict->SetInteger(printing::kSettingColor, printing::GRAY);
45 dict->SetBoolean(printing::kSettingPrintToPDF, true); 45 dict->SetBoolean(printing::kSettingPrintToPDF, true);
46 dict->SetInteger(printing::kSettingDuplexMode, printing::SIMPLEX); 46 dict->SetInteger(printing::kSettingDuplexMode, printing::SIMPLEX);
47 dict->SetInteger(printing::kSettingCopies, 1); 47 dict->SetInteger(printing::kSettingCopies, 1);
48 dict->SetString(printing::kSettingDeviceName, "dummy"); 48 dict->SetString(printing::kSettingDeviceName, "dummy");
49 dict->SetString(printing::kPreviewUIAddr, "0xb33fbeef"); 49 dict->SetString(printing::kPreviewUIAddr, "0xb33fbeef");
50 dict->SetInteger(printing::kPreviewRequestID, 12345); 50 dict->SetInteger(printing::kPreviewRequestID, 12345);
51 dict->SetBoolean(printing::kIsFirstRequest, true); 51 dict->SetBoolean(printing::kIsFirstRequest, true);
52 dict->SetInteger(printing::kSettingMarginsType, printing::DEFAULT_MARGINS); 52 dict->SetInteger(printing::kSettingMarginsType, printing::DEFAULT_MARGINS);
53 dict->SetBoolean(printing::kSettingPreviewModifiable, false);
53 dict->SetBoolean(printing::kSettingHeaderFooterEnabled, false); 54 dict->SetBoolean(printing::kSettingHeaderFooterEnabled, false);
54 dict->SetBoolean(printing::kSettingGenerateDraftData, true); 55 dict->SetBoolean(printing::kSettingGenerateDraftData, true);
55 } 56 }
56 57
57 } // namespace 58 } // namespace
58 59
59 class PrintWebViewHelperTestBase : public ChromeRenderViewTest { 60 class PrintWebViewHelperTestBase : public ChromeRenderViewTest {
60 public: 61 public:
61 PrintWebViewHelperTestBase() {} 62 PrintWebViewHelperTestBase() {}
62 ~PrintWebViewHelperTestBase() {} 63 ~PrintWebViewHelperTestBase() {}
(...skipping 472 matching lines...) Expand 10 before | Expand all | Expand 10 after
535 // Fill in some dummy values. 536 // Fill in some dummy values.
536 DictionaryValue dict; 537 DictionaryValue dict;
537 CreatePrintSettingsDictionary(&dict); 538 CreatePrintSettingsDictionary(&dict);
538 OnPrintForPrintPreview(dict); 539 OnPrintForPrintPreview(dict);
539 540
540 VerifyPrintFailed(true); 541 VerifyPrintFailed(true);
541 VerifyPagesPrinted(false); 542 VerifyPagesPrinted(false);
542 } 543 }
543 544
544 #endif // !defined(OS_CHROMEOS) 545 #endif // !defined(OS_CHROMEOS)
OLDNEW
« no previous file with comments | « chrome/renderer/print_web_view_helper.cc ('k') | printing/print_job_constants.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698