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

Side by Side Diff: printing/printing_context_win_unittest.cc

Issue 1513043002: clang/win: Let remaining chromium_code targets build with -Wextra. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 5 years 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
« no previous file with comments | « net/udp/udp_socket_unittest.cc ('k') | remoting/host/local_input_monitor_win.cc » ('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 "printing/printing_context_win.h" 5 #include "printing/printing_context_win.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/message_loop/message_loop.h" 8 #include "base/message_loop/message_loop.h"
9 #include "base/win/scoped_handle.h" 9 #include "base/win/scoped_handle.h"
10 #include "base/win/scoped_hdc.h" 10 #include "base/win/scoped_hdc.h"
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
145 145
146 MockPrintingContextWin context(this); 146 MockPrintingContextWin context(this);
147 context.AskUserForSettings( 147 context.AskUserForSettings(
148 123, 148 123,
149 false, 149 false,
150 false, 150 false,
151 base::Bind(&PrintingContextTest::PrintSettingsCallback, 151 base::Bind(&PrintingContextTest::PrintSettingsCallback,
152 base::Unretained(this))); 152 base::Unretained(this)));
153 EXPECT_EQ(PrintingContext::OK, result()); 153 EXPECT_EQ(PrintingContext::OK, result());
154 PrintSettings settings = context.settings(); 154 PrintSettings settings = context.settings();
155 EXPECT_EQ(settings.ranges().size(), 0); 155 EXPECT_EQ(0u, settings.ranges().size());
156 } 156 }
157 157
158 TEST_F(PrintingContextTest, Base) { 158 TEST_F(PrintingContextTest, Base) {
159 if (IsTestCaseDisabled()) 159 if (IsTestCaseDisabled())
160 return; 160 return;
161 161
162 PrintSettings settings; 162 PrintSettings settings;
163 settings.set_device_name(GetDefaultPrinter()); 163 settings.set_device_name(GetDefaultPrinter());
164 // Initialize it. 164 // Initialize it.
165 scoped_ptr<PrintingContext> context(PrintingContext::Create(this)); 165 scoped_ptr<PrintingContext> context(PrintingContext::Create(this));
166 EXPECT_EQ(PrintingContext::OK, context->InitWithSettings(settings)); 166 EXPECT_EQ(PrintingContext::OK, context->InitWithSettings(settings));
167 167
168 // The print may lie to use and may not support world transformation. 168 // The print may lie to use and may not support world transformation.
169 // Verify right now. 169 // Verify right now.
170 XFORM random_matrix = { 1, 0.1f, 0, 1.5f, 0, 1 }; 170 XFORM random_matrix = { 1, 0.1f, 0, 1.5f, 0, 1 };
171 EXPECT_TRUE(SetWorldTransform(context->context(), &random_matrix)); 171 EXPECT_TRUE(SetWorldTransform(context->context(), &random_matrix));
172 EXPECT_TRUE(ModifyWorldTransform(context->context(), NULL, MWT_IDENTITY)); 172 EXPECT_TRUE(ModifyWorldTransform(context->context(), NULL, MWT_IDENTITY));
173 } 173 }
174 174
175 } // namespace printing 175 } // namespace printing
OLDNEW
« no previous file with comments | « net/udp/udp_socket_unittest.cc ('k') | remoting/host/local_input_monitor_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698