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

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

Issue 8261005: More options for the types of margins to add. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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/render_view_test.h" 8 #include "chrome/test/base/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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 dict->SetBoolean(printing::kSettingLandscape, false); 42 dict->SetBoolean(printing::kSettingLandscape, false);
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->SetBoolean(printing::kSettingDefaultMarginsSelected, true); 52 dict->SetInteger(printing::kSettingMarginsType, printing::DEFAULT_MARGINS);
53 dict->SetBoolean(printing::kSettingHeaderFooterEnabled, false); 53 dict->SetBoolean(printing::kSettingHeaderFooterEnabled, false);
54 dict->SetBoolean(printing::kSettingGenerateDraftData, true); 54 dict->SetBoolean(printing::kSettingGenerateDraftData, true);
55 } 55 }
56 56
57 } // namespace 57 } // namespace
58 58
59 class PrintWebViewHelperTestBase : public RenderViewTest { 59 class PrintWebViewHelperTestBase : public RenderViewTest {
60 public: 60 public:
61 PrintWebViewHelperTestBase() {} 61 PrintWebViewHelperTestBase() {}
62 ~PrintWebViewHelperTestBase() {} 62 ~PrintWebViewHelperTestBase() {}
(...skipping 469 matching lines...) Expand 10 before | Expand all | Expand 10 after
532 // Fill in some dummy values. 532 // Fill in some dummy values.
533 DictionaryValue dict; 533 DictionaryValue dict;
534 CreatePrintSettingsDictionary(&dict); 534 CreatePrintSettingsDictionary(&dict);
535 OnPrintForPrintPreview(dict); 535 OnPrintForPrintPreview(dict);
536 536
537 VerifyPrintFailed(true); 537 VerifyPrintFailed(true);
538 VerifyPagesPrinted(false); 538 VerifyPagesPrinted(false);
539 } 539 }
540 540
541 #endif // !defined(OS_CHROMEOS) 541 #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