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

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

Issue 12226045: Linux/ChromeOS Chromium style checker cleanup, chrome/ edition part 1. (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: Created 7 years, 10 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "base/command_line.h" 5 #include "base/command_line.h"
6 #include "chrome/common/chrome_switches.h" 6 #include "chrome/common/chrome_switches.h"
7 #include "chrome/common/print_messages.h" 7 #include "chrome/common/print_messages.h"
8 #include "chrome/renderer/mock_printer.h" 8 #include "chrome/renderer/mock_printer.h"
9 #include "chrome/renderer/printing/print_web_view_helper.h" 9 #include "chrome/renderer/printing/print_web_view_helper.h"
10 #include "chrome/test/base/chrome_render_view_test.h" 10 #include "chrome/test/base/chrome_render_view_test.h"
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 dict->SetBoolean(kSettingGenerateDraftData, true); 101 dict->SetBoolean(kSettingGenerateDraftData, true);
102 dict->SetBoolean(kSettingShouldPrintBackgrounds, false); 102 dict->SetBoolean(kSettingShouldPrintBackgrounds, false);
103 dict->SetBoolean(kSettingShouldPrintSelectionOnly, false); 103 dict->SetBoolean(kSettingShouldPrintSelectionOnly, false);
104 } 104 }
105 105
106 } // namespace 106 } // namespace
107 107
108 class PrintWebViewHelperTestBase : public ChromeRenderViewTest { 108 class PrintWebViewHelperTestBase : public ChromeRenderViewTest {
109 public: 109 public:
110 PrintWebViewHelperTestBase() {} 110 PrintWebViewHelperTestBase() {}
111 ~PrintWebViewHelperTestBase() {} 111 virtual ~PrintWebViewHelperTestBase() {}
112 112
113 protected: 113 protected:
114 // The renderer should be done calculating the number of rendered pages 114 // The renderer should be done calculating the number of rendered pages
115 // according to the specified settings defined in the mock render thread. 115 // according to the specified settings defined in the mock render thread.
116 // Verify the page count is correct. 116 // Verify the page count is correct.
117 void VerifyPageCount(int count) { 117 void VerifyPageCount(int count) {
118 #if defined(OS_CHROMEOS) 118 #if defined(OS_CHROMEOS)
119 // The DidGetPrintedPagesCount message isn't sent on ChromeOS. Right now we 119 // The DidGetPrintedPagesCount message isn't sent on ChromeOS. Right now we
120 // always print all pages, and there are checks to that effect built into 120 // always print all pages, and there are checks to that effect built into
121 // the print code. 121 // the print code.
(...skipping 846 matching lines...) Expand 10 before | Expand all | Expand 10 after
968 chrome_render_thread_->printer()->ResetPrinter(); 968 chrome_render_thread_->printer()->ResetPrinter();
969 VerifyPagesPrinted(false); 969 VerifyPagesPrinted(false);
970 970
971 // Pretend user will print, should not be throttled. 971 // Pretend user will print, should not be throttled.
972 chrome_render_thread_->set_print_dialog_user_response(true); 972 chrome_render_thread_->set_print_dialog_user_response(true);
973 LoadHTML(kPrintWithJSHTML); 973 LoadHTML(kPrintWithJSHTML);
974 VerifyPagesPrinted(true); 974 VerifyPagesPrinted(true);
975 } 975 }
976 976
977 } // namespace printing 977 } // namespace printing
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698