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

Side by Side Diff: ui/snapshot/snapshot_aura_unittest.cc

Issue 1868363002: Replace scoped_ptr with std::unique_ptr in //ui (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@scopedptrcc
Patch Set: scopedptrui: rebase-make_scoped_ptr 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 | « ui/snapshot/snapshot_aura.cc ('k') | ui/snapshot/snapshot_mac_unittest.mm » ('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) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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 "ui/snapshot/snapshot.h" 5 #include "ui/snapshot/snapshot.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 168 matching lines...) Expand 10 before | Expand all | Expand 10 after
179 179
180 private: 180 private:
181 friend class base::RefCountedThreadSafe<SnapshotHolder>; 181 friend class base::RefCountedThreadSafe<SnapshotHolder>;
182 182
183 virtual ~SnapshotHolder() {} 183 virtual ~SnapshotHolder() {}
184 184
185 gfx::Image image_; 185 gfx::Image image_;
186 bool completed_; 186 bool completed_;
187 }; 187 };
188 188
189 scoped_ptr<aura::test::AuraTestHelper> helper_; 189 std::unique_ptr<aura::test::AuraTestHelper> helper_;
190 scoped_ptr<aura::Window> test_window_; 190 std::unique_ptr<aura::Window> test_window_;
191 scoped_ptr<TestPaintingWindowDelegate> delegate_; 191 std::unique_ptr<TestPaintingWindowDelegate> delegate_;
192 std::vector<unsigned char> png_representation_; 192 std::vector<unsigned char> png_representation_;
193 193
194 DISALLOW_COPY_AND_ASSIGN(SnapshotAuraTest); 194 DISALLOW_COPY_AND_ASSIGN(SnapshotAuraTest);
195 }; 195 };
196 196
197 TEST_F(SnapshotAuraTest, FullScreenWindow) { 197 TEST_F(SnapshotAuraTest, FullScreenWindow) {
198 SetupTestWindow(root_window()->bounds()); 198 SetupTestWindow(root_window()->bounds());
199 WaitForDraw(); 199 WaitForDraw();
200 200
201 gfx::Image snapshot = GrabSnapshotForTestWindow(); 201 gfx::Image snapshot = GrabSnapshotForTestWindow();
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
292 gfx::SizeF snapshot_size(test_bounds.size()); 292 gfx::SizeF snapshot_size(test_bounds.size());
293 snapshot_size.Scale(2.0f); 293 snapshot_size.Scale(2.0f);
294 294
295 gfx::Image snapshot = GrabSnapshotForTestWindow(); 295 gfx::Image snapshot = GrabSnapshotForTestWindow();
296 EXPECT_EQ(gfx::ToRoundedSize(snapshot_size).ToString(), 296 EXPECT_EQ(gfx::ToRoundedSize(snapshot_size).ToString(),
297 snapshot.Size().ToString()); 297 snapshot.Size().ToString());
298 EXPECT_EQ(0u, GetFailedPixelsCountWithScaleFactor(snapshot, 2)); 298 EXPECT_EQ(0u, GetFailedPixelsCountWithScaleFactor(snapshot, 2));
299 } 299 }
300 300
301 } // namespace ui 301 } // namespace ui
OLDNEW
« no previous file with comments | « ui/snapshot/snapshot_aura.cc ('k') | ui/snapshot/snapshot_mac_unittest.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698