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

Side by Side Diff: components/printing/test/mock_printer.h

Issue 2719443003: Reland of Add automated testing to check for page size with scaling (Closed)
Patch Set: Created 3 years, 9 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 #ifndef COMPONENTS_PRINTING_TEST_MOCK_PRINTER_H_ 5 #ifndef COMPONENTS_PRINTING_TEST_MOCK_PRINTER_H_
6 #define COMPONENTS_PRINTING_TEST_MOCK_PRINTER_H_ 6 #define COMPONENTS_PRINTING_TEST_MOCK_PRINTER_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <memory> 10 #include <memory>
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 78
79 // Functions that handles IPC events. 79 // Functions that handles IPC events.
80 void GetDefaultPrintSettings(PrintMsg_Print_Params* params); 80 void GetDefaultPrintSettings(PrintMsg_Print_Params* params);
81 void ScriptedPrint(int cookie, 81 void ScriptedPrint(int cookie,
82 int expected_pages_count, 82 int expected_pages_count,
83 bool has_selection, 83 bool has_selection,
84 PrintMsg_PrintPages_Params* settings); 84 PrintMsg_PrintPages_Params* settings);
85 void UpdateSettings(int cookie, 85 void UpdateSettings(int cookie,
86 PrintMsg_PrintPages_Params* params, 86 PrintMsg_PrintPages_Params* params,
87 const std::vector<int>& page_range_array, 87 const std::vector<int>& page_range_array,
88 int margins_type); 88 int margins_type,
89 const gfx::Size& page_size,
90 int scale_factor);
89 void SetPrintedPagesCount(int cookie, int number_pages); 91 void SetPrintedPagesCount(int cookie, int number_pages);
90 void PrintPage(const PrintHostMsg_DidPrintPage_Params& params); 92 void PrintPage(const PrintHostMsg_DidPrintPage_Params& params);
91 93
92 // Functions that retrieve the output pages. 94 // Functions that retrieve the output pages.
93 Status GetPrinterStatus() const { return printer_status_; } 95 Status GetPrinterStatus() const { return printer_status_; }
94 int GetPrintedPages() const; 96 int GetPrintedPages() const;
95 97
96 // Get a pointer to the printed page, returns NULL if pageno has not been 98 // Get a pointer to the printed page, returns NULL if pageno has not been
97 // printed. The pointer is for read only view and should not be deleted. 99 // printed. The pointer is for read only view and should not be deleted.
98 const MockPrinterPage* GetPrintedPage(unsigned int pageno) const; 100 const MockPrinterPage* GetPrintedPage(unsigned int pageno) const;
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
158 160
159 // Used for generating invalid settings. 161 // Used for generating invalid settings.
160 bool use_invalid_settings_; 162 bool use_invalid_settings_;
161 163
162 std::vector<scoped_refptr<MockPrinterPage>> pages_; 164 std::vector<scoped_refptr<MockPrinterPage>> pages_;
163 165
164 DISALLOW_COPY_AND_ASSIGN(MockPrinter); 166 DISALLOW_COPY_AND_ASSIGN(MockPrinter);
165 }; 167 };
166 168
167 #endif // COMPONENTS_PRINTING_TEST_MOCK_PRINTER_H_ 169 #endif // COMPONENTS_PRINTING_TEST_MOCK_PRINTER_H_
OLDNEW
« no previous file with comments | « components/printing/renderer/print_web_view_helper.cc ('k') | components/printing/test/mock_printer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698