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

Side by Side Diff: chrome/browser/manifest/manifest_icon_downloader_unittest.cc

Issue 1550593002: Switch to standard integer types in chrome/browser/, part 2 of 4. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 12 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
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 "chrome/browser/manifest/manifest_icon_downloader.h" 5 #include "chrome/browser/manifest/manifest_icon_downloader.h"
6 6
7 #include <string> 7 #include <string>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/macros.h"
10 #include "testing/gtest/include/gtest/gtest.h" 11 #include "testing/gtest/include/gtest/gtest.h"
11 12
12 class ManifestIconDownloaderTest : public testing::Test { 13 class ManifestIconDownloaderTest : public testing::Test {
13 protected: 14 protected:
14 ManifestIconDownloaderTest() = default; 15 ManifestIconDownloaderTest() = default;
15 ~ManifestIconDownloaderTest() override = default; 16 ~ManifestIconDownloaderTest() override = default;
16 17
17 int FindBitmap(const int ideal_icon_size_in_px, 18 int FindBitmap(const int ideal_icon_size_in_px,
18 const int minimum_icon_size_in_px, 19 const int minimum_icon_size_in_px,
19 const std::vector<SkBitmap>& bitmaps) { 20 const std::vector<SkBitmap>& bitmaps) {
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
131 ASSERT_EQ(1, FindBitmap(35, 0, bitmaps)); 132 ASSERT_EQ(1, FindBitmap(35, 0, bitmaps));
132 } 133 }
133 134
134 TEST_F(ManifestIconDownloaderTest, NonSquareBelowMinimumIsNotPicked) { 135 TEST_F(ManifestIconDownloaderTest, NonSquareBelowMinimumIsNotPicked) {
135 std::vector<SkBitmap> bitmaps; 136 std::vector<SkBitmap> bitmaps;
136 bitmaps.push_back(CreateDummyBitmap(10, 15)); 137 bitmaps.push_back(CreateDummyBitmap(10, 15));
137 bitmaps.push_back(CreateDummyBitmap(15, 10)); 138 bitmaps.push_back(CreateDummyBitmap(15, 10));
138 139
139 ASSERT_EQ(-1, FindBitmap(15, 11, bitmaps)); 140 ASSERT_EQ(-1, FindBitmap(15, 11, bitmaps));
140 } 141 }
OLDNEW
« no previous file with comments | « chrome/browser/manifest/manifest_icon_downloader.cc ('k') | chrome/browser/manifest/manifest_icon_selector.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698