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

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

Issue 7348010: Added Header and Footer support using Skia (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Removed use of webkit_scale_factor in print_web_view_helper_mac 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 unified diff | Download patch | Annotate | Revision Log
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 "printing/print_job_constants.h" 9 #include "printing/print_job_constants.h"
10 #include "testing/gtest/include/gtest/gtest.h" 10 #include "testing/gtest/include/gtest/gtest.h"
(...skipping 24 matching lines...) Expand all
35 35
36 void CreatePrintSettingsDictionary(DictionaryValue* dict) { 36 void CreatePrintSettingsDictionary(DictionaryValue* dict) {
37 dict->SetBoolean(printing::kSettingLandscape, false); 37 dict->SetBoolean(printing::kSettingLandscape, false);
38 dict->SetBoolean(printing::kSettingCollate, false); 38 dict->SetBoolean(printing::kSettingCollate, false);
39 dict->SetBoolean(printing::kSettingColor, false); 39 dict->SetBoolean(printing::kSettingColor, false);
40 dict->SetBoolean(printing::kSettingPrintToPDF, true); 40 dict->SetBoolean(printing::kSettingPrintToPDF, true);
41 dict->SetInteger(printing::kSettingDuplexMode, printing::SIMPLEX); 41 dict->SetInteger(printing::kSettingDuplexMode, printing::SIMPLEX);
42 dict->SetInteger(printing::kSettingCopies, 1); 42 dict->SetInteger(printing::kSettingCopies, 1);
43 dict->SetString(printing::kSettingDeviceName, "dummy"); 43 dict->SetString(printing::kSettingDeviceName, "dummy");
44 dict->SetInteger(printing::kPreviewRequestID, 12345); 44 dict->SetInteger(printing::kPreviewRequestID, 12345);
45 dict->SetBoolean(printing::kSettingHeaderFooterEnabled, false);
45 } 46 }
46 47
47 } // namespace 48 } // namespace
48 49
49 class PrintWebViewHelperTestBase : public RenderViewTest { 50 class PrintWebViewHelperTestBase : public RenderViewTest {
50 public: 51 public:
51 PrintWebViewHelperTestBase() {} 52 PrintWebViewHelperTestBase() {}
52 ~PrintWebViewHelperTestBase() {} 53 ~PrintWebViewHelperTestBase() {}
53 54
54 protected: 55 protected:
(...skipping 346 matching lines...) Expand 10 before | Expand all | Expand 10 after
401 LoadHTML(kPrintPreviewHTML); 402 LoadHTML(kPrintPreviewHTML);
402 403
403 // An empty dictionary should fail. 404 // An empty dictionary should fail.
404 DictionaryValue empty_dict; 405 DictionaryValue empty_dict;
405 PrintWebViewHelper::Get(view_)->OnPrintForPrintPreview(empty_dict); 406 PrintWebViewHelper::Get(view_)->OnPrintForPrintPreview(empty_dict);
406 407
407 VerifyPrintFailed(true); 408 VerifyPrintFailed(true);
408 VerifyPagesPrinted(false); 409 VerifyPagesPrinted(false);
409 } 410 }
410 #endif // !defined(OS_CHROMEOS) 411 #endif // !defined(OS_CHROMEOS)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698