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

Side by Side Diff: ui/gfx/icon_util_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 | « ui/gfx/gdi_util.cc ('k') | ui/gfx/platform_font_win_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 (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 "ui/gfx/icon_util.h" 5 #include "ui/gfx/icon_util.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/files/file_util.h" 9 #include "base/files/file_util.h"
10 #include "base/files/scoped_temp_dir.h" 10 #include "base/files/scoped_temp_dir.h"
(...skipping 399 matching lines...) Expand 10 before | Expand all | Expand 10 after
410 HMODULE module = GetModuleHandle(NULL); 410 HMODULE module = GetModuleHandle(NULL);
411 scoped_ptr<gfx::ImageFamily> family( 411 scoped_ptr<gfx::ImageFamily> family(
412 IconUtil::CreateImageFamilyFromIconResource(module, IDR_MAINFRAME)); 412 IconUtil::CreateImageFamilyFromIconResource(module, IDR_MAINFRAME));
413 ASSERT_TRUE(family.get()); 413 ASSERT_TRUE(family.get());
414 EXPECT_FALSE(family->empty()); 414 EXPECT_FALSE(family->empty());
415 std::vector<gfx::Image> images; 415 std::vector<gfx::Image> images;
416 for (const auto& image : *family) 416 for (const auto& image : *family)
417 images.push_back(image); 417 images.push_back(image);
418 418
419 // Assert that the family contains all of the images from the icon resource. 419 // Assert that the family contains all of the images from the icon resource.
420 EXPECT_EQ(5, images.size()); 420 EXPECT_EQ(5u, images.size());
421 EXPECT_EQ(16, images[0].Width()); 421 EXPECT_EQ(16, images[0].Width());
422 EXPECT_EQ(24, images[1].Width()); 422 EXPECT_EQ(24, images[1].Width());
423 EXPECT_EQ(32, images[2].Width()); 423 EXPECT_EQ(32, images[2].Width());
424 EXPECT_EQ(48, images[3].Width()); 424 EXPECT_EQ(48, images[3].Width());
425 EXPECT_EQ(256, images[4].Width()); 425 EXPECT_EQ(256, images[4].Width());
426 } 426 }
427 427
428 // This tests that kNumIconDimensionsUpToMediumSize has the correct value. 428 // This tests that kNumIconDimensionsUpToMediumSize has the correct value.
429 TEST_F(IconUtilTest, TestNumIconDimensionsUpToMediumSize) { 429 TEST_F(IconUtilTest, TestNumIconDimensionsUpToMediumSize) {
430 ASSERT_LE(IconUtil::kNumIconDimensionsUpToMediumSize, 430 ASSERT_LE(IconUtil::kNumIconDimensionsUpToMediumSize,
431 IconUtil::kNumIconDimensions); 431 IconUtil::kNumIconDimensions);
432 EXPECT_EQ(IconUtil::kMediumIconSize, 432 EXPECT_EQ(IconUtil::kMediumIconSize,
433 IconUtil::kIconDimensions[ 433 IconUtil::kIconDimensions[
434 IconUtil::kNumIconDimensionsUpToMediumSize - 1]); 434 IconUtil::kNumIconDimensionsUpToMediumSize - 1]);
435 } 435 }
OLDNEW
« no previous file with comments | « ui/gfx/gdi_util.cc ('k') | ui/gfx/platform_font_win_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698