Commit 68f381a7 authored by pkotwicz's avatar pkotwicz Committed by Commit bot

Fix SelectFaviconFramesTest on Nexus 5

BUG=407561
TEST=Tests pass in Nexus 5

Review URL: https://codereview.chromium.org/521393002

Cr-Commit-Position: refs/heads/master@{#292977}
parent 85423a03
...@@ -197,6 +197,8 @@ TEST(SelectFaviconFramesTest, _16From16_Scale2x_32_From_32) { ...@@ -197,6 +197,8 @@ TEST(SelectFaviconFramesTest, _16From16_Scale2x_32_From_32) {
} }
TEST(SelectFaviconFramesTest, ExactMatchBetterThanLargeBitmap) { TEST(SelectFaviconFramesTest, ExactMatchBetterThanLargeBitmap) {
SCOPED_FAVICON_SCALE_FACTOR_1XAND2X;
float score1; float score1;
vector<SkBitmap> bitmaps1; vector<SkBitmap> bitmaps1;
bitmaps1.push_back(MakeBitmap(SK_ColorGREEN, 48, 48)); bitmaps1.push_back(MakeBitmap(SK_ColorGREEN, 48, 48));
...@@ -215,6 +217,8 @@ TEST(SelectFaviconFramesTest, ExactMatchBetterThanLargeBitmap) { ...@@ -215,6 +217,8 @@ TEST(SelectFaviconFramesTest, ExactMatchBetterThanLargeBitmap) {
} }
TEST(SelectFaviconFramesTest, UpsampleABitBetterThanHugeBitmap) { TEST(SelectFaviconFramesTest, UpsampleABitBetterThanHugeBitmap) {
SCOPED_FAVICON_SCALE_FACTOR_1XAND2X;
float score1; float score1;
vector<SkBitmap> bitmaps1; vector<SkBitmap> bitmaps1;
bitmaps1.push_back(MakeBitmap(SK_ColorGREEN, 128, 128)); bitmaps1.push_back(MakeBitmap(SK_ColorGREEN, 128, 128));
...@@ -245,6 +249,8 @@ TEST(SelectFaviconFramesTest, UpsampleABitBetterThanHugeBitmap) { ...@@ -245,6 +249,8 @@ TEST(SelectFaviconFramesTest, UpsampleABitBetterThanHugeBitmap) {
} }
TEST(SelectFaviconFramesTest, DownsamplingBetterThanUpsampling) { TEST(SelectFaviconFramesTest, DownsamplingBetterThanUpsampling) {
SCOPED_FAVICON_SCALE_FACTOR_1XAND2X;
float score1; float score1;
vector<SkBitmap> bitmaps1; vector<SkBitmap> bitmaps1;
bitmaps1.push_back(MakeBitmap(SK_ColorGREEN, 8, 8)); bitmaps1.push_back(MakeBitmap(SK_ColorGREEN, 8, 8));
...@@ -261,6 +267,8 @@ TEST(SelectFaviconFramesTest, DownsamplingBetterThanUpsampling) { ...@@ -261,6 +267,8 @@ TEST(SelectFaviconFramesTest, DownsamplingBetterThanUpsampling) {
} }
TEST(SelectFaviconFramesTest, DownsamplingLessIsBetter) { TEST(SelectFaviconFramesTest, DownsamplingLessIsBetter) {
SCOPED_FAVICON_SCALE_FACTOR_1XAND2X;
float score1; float score1;
vector<SkBitmap> bitmaps1; vector<SkBitmap> bitmaps1;
bitmaps1.push_back(MakeBitmap(SK_ColorGREEN, 34, 34)); bitmaps1.push_back(MakeBitmap(SK_ColorGREEN, 34, 34));
...@@ -277,6 +285,8 @@ TEST(SelectFaviconFramesTest, DownsamplingLessIsBetter) { ...@@ -277,6 +285,8 @@ TEST(SelectFaviconFramesTest, DownsamplingLessIsBetter) {
} }
TEST(SelectFaviconFramesTest, UpsamplingLessIsBetter) { TEST(SelectFaviconFramesTest, UpsamplingLessIsBetter) {
SCOPED_FAVICON_SCALE_FACTOR_1XAND2X;
float score1; float score1;
vector<SkBitmap> bitmaps1; vector<SkBitmap> bitmaps1;
bitmaps1.push_back(MakeBitmap(SK_ColorGREEN, 8, 8)); bitmaps1.push_back(MakeBitmap(SK_ColorGREEN, 8, 8));
...@@ -295,6 +305,8 @@ TEST(SelectFaviconFramesTest, UpsamplingLessIsBetter) { ...@@ -295,6 +305,8 @@ TEST(SelectFaviconFramesTest, UpsamplingLessIsBetter) {
// Test that the score is determined by the |original_sizes| parameter, not the // Test that the score is determined by the |original_sizes| parameter, not the
// |bitmaps| parameter to SelectFaviconFrames(). // |bitmaps| parameter to SelectFaviconFrames().
TEST(SelectFaviconFramesTest, ScoreDeterminedByOriginalSizes) { TEST(SelectFaviconFramesTest, ScoreDeterminedByOriginalSizes) {
SCOPED_FAVICON_SCALE_FACTOR_1XAND2X;
vector<SkBitmap> bitmaps1; vector<SkBitmap> bitmaps1;
bitmaps1.push_back(MakeBitmap(SK_ColorGREEN, 16, 16)); bitmaps1.push_back(MakeBitmap(SK_ColorGREEN, 16, 16));
vector<gfx::Size> sizes1; vector<gfx::Size> sizes1;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment