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

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

Issue 2718513003: Revert of Add automated testing to check for page size with scaling (Closed)
Patch Set: Created 3 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
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);
91 void SetPrintedPagesCount(int cookie, int number_pages); 89 void SetPrintedPagesCount(int cookie, int number_pages);
92 void PrintPage(const PrintHostMsg_DidPrintPage_Params& params); 90 void PrintPage(const PrintHostMsg_DidPrintPage_Params& params);
93 91
94 // Functions that retrieve the output pages. 92 // Functions that retrieve the output pages.
95 Status GetPrinterStatus() const { return printer_status_; } 93 Status GetPrinterStatus() const { return printer_status_; }
96 int GetPrintedPages() const; 94 int GetPrintedPages() const;
97 95
98 // Get a pointer to the printed page, returns NULL if pageno has not been 96 // Get a pointer to the printed page, returns NULL if pageno has not been
99 // printed. The pointer is for read only view and should not be deleted. 97 // printed. The pointer is for read only view and should not be deleted.
100 const MockPrinterPage* GetPrintedPage(unsigned int pageno) const; 98 const MockPrinterPage* GetPrintedPage(unsigned int pageno) const;
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
160 158
161 // Used for generating invalid settings. 159 // Used for generating invalid settings.
162 bool use_invalid_settings_; 160 bool use_invalid_settings_;
163 161
164 std::vector<scoped_refptr<MockPrinterPage>> pages_; 162 std::vector<scoped_refptr<MockPrinterPage>> pages_;
165 163
166 DISALLOW_COPY_AND_ASSIGN(MockPrinter); 164 DISALLOW_COPY_AND_ASSIGN(MockPrinter);
167 }; 165 };
168 166
169 #endif // COMPONENTS_PRINTING_TEST_MOCK_PRINTER_H_ 167 #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