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

Side by Side Diff: ui/base/resource/resource_bundle_mac_unittest.mm

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/base/resource/resource_bundle_mac.mm ('k') | ui/base/resource/resource_bundle_unittest.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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/base/resource/resource_bundle.h" 5 #include "ui/base/resource/resource_bundle.h"
6 6
7 #import <AppKit/AppKit.h> 7 #import <AppKit/AppKit.h>
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
138 num_material_packs++; 138 num_material_packs++;
139 } 139 }
140 140
141 return num_material_packs; 141 return num_material_packs;
142 } 142 }
143 143
144 protected: 144 protected:
145 ResourceBundle* resource_bundle_; 145 ResourceBundle* resource_bundle_;
146 146
147 private: 147 private:
148 scoped_ptr<DataPack> locale_pack_; 148 std::unique_ptr<DataPack> locale_pack_;
149 base::ScopedTempDir dir_; 149 base::ScopedTempDir dir_;
150 150
151 DISALLOW_COPY_AND_ASSIGN(ResourceBundleMacImageTest); 151 DISALLOW_COPY_AND_ASSIGN(ResourceBundleMacImageTest);
152 }; 152 };
153 153
154 // Verifies that ResourceBundle searches the Material Design data pack before 154 // Verifies that ResourceBundle searches the Material Design data pack before
155 // the default data pack, and that the returned image contains only the 155 // the default data pack, and that the returned image contains only the
156 // representation from the Material Design pack. 156 // representation from the Material Design pack.
157 TEST_F(ResourceBundleMacImageTest, CheckImageFromMaterialDesign) { 157 TEST_F(ResourceBundleMacImageTest, CheckImageFromMaterialDesign) {
158 // Create two .pak files, each containing a single image with the 158 // Create two .pak files, each containing a single image with the
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
196 // Design pack, any images it contains should override the ones in the default 196 // Design pack, any images it contains should override the ones in the default
197 // pack, so if both packs contain the same image, the returned NSImage should 197 // pack, so if both packs contain the same image, the returned NSImage should
198 // contain just a single representation. 198 // contain just a single representation.
199 NSImage* icon = resource_bundle->GetNativeImageNamed(3).ToNSImage(); 199 NSImage* icon = resource_bundle->GetNativeImageNamed(3).ToNSImage();
200 const unsigned long representations_count = [[icon representations] count]; 200 const unsigned long representations_count = [[icon representations] count];
201 const unsigned long expected_count = 1; 201 const unsigned long expected_count = 1;
202 EXPECT_EQ(expected_count, representations_count); 202 EXPECT_EQ(expected_count, representations_count);
203 } 203 }
204 204
205 } // namespace ui 205 } // namespace ui
OLDNEW
« no previous file with comments | « ui/base/resource/resource_bundle_mac.mm ('k') | ui/base/resource/resource_bundle_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698