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

Side by Side Diff: printing/printing_context_win_unittest.cc

Issue 1863223002: Convert //printing to use std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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
« no previous file with comments | « printing/printing_context_win.cc ('k') | no next file » | 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 <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after
155 EXPECT_EQ(0u, settings.ranges().size()); 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 std::unique_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 | « printing/printing_context_win.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698