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

Side by Side Diff: gfx/icon_util_unittest.cc

Issue 2657005: Get rid of DISALLOW_EVIL_CONSTRUCTORS macro usage in our code base. (Closed) Base URL: git://git.chromium.org/chromium.git
Patch Set: added the macro back Created 10 years, 6 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 | « base/basictypes.h ('k') | gpu/command_buffer/common/types.h » ('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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 "base/scoped_ptr.h" 5 #include "base/scoped_ptr.h"
6 #include "base/file_util.h" 6 #include "base/file_util.h"
7 #include "base/path_service.h" 7 #include "base/path_service.h"
8 #include "gfx/gfx_paths.h" 8 #include "gfx/gfx_paths.h"
9 #include "gfx/icon_util.h" 9 #include "gfx/icon_util.h"
10 #include "gfx/size.h" 10 #include "gfx/size.h"
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 height, 42 height,
43 LR_LOADTRANSPARENT | LR_LOADFROMFILE)); 43 LR_LOADTRANSPARENT | LR_LOADFROMFILE));
44 return icon; 44 return icon;
45 } 45 }
46 46
47 protected: 47 protected:
48 // The root directory for test files. 48 // The root directory for test files.
49 std::wstring test_data_directory_; 49 std::wstring test_data_directory_;
50 50
51 private: 51 private:
52 DISALLOW_EVIL_CONSTRUCTORS(IconUtilTest); 52 DISALLOW_COPY_AND_ASSIGN(IconUtilTest);
53 }; 53 };
54 }; 54 };
55 55
56 // The following test case makes sure IconUtil::SkBitmapFromHICON fails 56 // The following test case makes sure IconUtil::SkBitmapFromHICON fails
57 // gracefully when called with invalid input parameters. 57 // gracefully when called with invalid input parameters.
58 TEST_F(IconUtilTest, TestIconToBitmapInvalidParameters) { 58 TEST_F(IconUtilTest, TestIconToBitmapInvalidParameters) {
59 std::wstring icon_filename(test_data_directory_); 59 std::wstring icon_filename(test_data_directory_);
60 file_util::AppendToPath(&icon_filename, kSmallIconName); 60 file_util::AppendToPath(&icon_filename, kSmallIconName);
61 gfx::Size icon_size(kSmallIconWidth, kSmallIconHeight); 61 gfx::Size icon_size(kSmallIconWidth, kSmallIconHeight);
62 HICON icon = LoadIconFromFile(icon_filename, 62 HICON icon = LoadIconFromFile(icon_filename,
(...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after
251 // the .ico file we just created. We don't really check the additional icon 251 // the .ico file we just created. We don't really check the additional icon
252 // images created by IconUtil::CreateIconFileFromSkBitmap. 252 // images created by IconUtil::CreateIconFileFromSkBitmap.
253 HICON icon = LoadIconFromFile(icon_filename, 253 HICON icon = LoadIconFromFile(icon_filename,
254 kSmallIconWidth, 254 kSmallIconWidth,
255 kSmallIconHeight); 255 kSmallIconHeight);
256 EXPECT_NE(icon, static_cast<HICON>(NULL)); 256 EXPECT_NE(icon, static_cast<HICON>(NULL));
257 if (icon != NULL) { 257 if (icon != NULL) {
258 ::DestroyIcon(icon); 258 ::DestroyIcon(icon);
259 } 259 }
260 } 260 }
OLDNEW
« no previous file with comments | « base/basictypes.h ('k') | gpu/command_buffer/common/types.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698