| Index: chrome/browser/history/select_favicon_frames_unittest.cc
|
| diff --git a/chrome/browser/history/select_favicon_frames_unittest.cc b/chrome/browser/history/select_favicon_frames_unittest.cc
|
| index 562ade13b54575e7b517f7f986d2b3b1091ea0bc..a71a4d22982f85c580e6e3800e171c95d822e954 100644
|
| --- a/chrome/browser/history/select_favicon_frames_unittest.cc
|
| +++ b/chrome/browser/history/select_favicon_frames_unittest.cc
|
| @@ -35,7 +35,8 @@ SkBitmap MakeBitmap(SkColor color, int w, int h) {
|
|
|
| SkColor GetColor(const gfx::ImageSkia& image, ui::ScaleFactor factor,
|
| int x = -1, int y = -1) {
|
| - const SkBitmap& bitmap = image.GetRepresentation(factor).sk_bitmap();
|
| + const SkBitmap& bitmap =
|
| + image.GetRepresentation(ui::GetScaleFactorScale(factor)).sk_bitmap();
|
| if (x == -1)
|
| x = bitmap.width() / 2;
|
| if (y == -1)
|
| @@ -62,7 +63,7 @@ TEST(SelectFaviconFramesTest, ZeroSizePicksLargest) {
|
|
|
| gfx::ImageSkia image = SelectFaviconFrames(bitmaps, Scale1x(), 0, NULL);
|
| EXPECT_EQ(1u, image.image_reps().size());
|
| - ASSERT_TRUE(image.HasRepresentation(ui::SCALE_FACTOR_100P));
|
| + ASSERT_TRUE(image.HasRepresentation(1.0f));
|
| EXPECT_EQ(48, image.width());
|
| EXPECT_EQ(48, image.height());
|
|
|
| @@ -77,7 +78,7 @@ TEST(SelectFaviconFramesTest, _16From16) {
|
|
|
| gfx::ImageSkia image = SelectFaviconFrames(bitmaps, Scale1x(), 16, NULL);
|
| EXPECT_EQ(1u, image.image_reps().size());
|
| - ASSERT_TRUE(image.HasRepresentation(ui::SCALE_FACTOR_100P));
|
| + ASSERT_TRUE(image.HasRepresentation(1.0f));
|
| EXPECT_EQ(16, image.width());
|
| EXPECT_EQ(16, image.height());
|
| EXPECT_EQ(SK_ColorGREEN, GetColor1x(image));
|
| @@ -91,7 +92,7 @@ TEST(SelectFaviconFramesTest, _16From17) {
|
| // Should resample from the bigger candidate.
|
| gfx::ImageSkia image = SelectFaviconFrames(bitmaps, Scale1x(), 16, NULL);
|
| EXPECT_EQ(1u, image.image_reps().size());
|
| - ASSERT_TRUE(image.HasRepresentation(ui::SCALE_FACTOR_100P));
|
| + ASSERT_TRUE(image.HasRepresentation(1.0f));
|
| EXPECT_EQ(16, image.width());
|
| EXPECT_EQ(16, image.height());
|
| EXPECT_EQ(SK_ColorGREEN, GetColor1x(image));
|
| @@ -106,7 +107,7 @@ TEST(SelectFaviconFramesTest, _16From15) {
|
| // candidate.
|
| gfx::ImageSkia image = SelectFaviconFrames(bitmaps, Scale1x(), 16, NULL);
|
| EXPECT_EQ(1u, image.image_reps().size());
|
| - ASSERT_TRUE(image.HasRepresentation(ui::SCALE_FACTOR_100P));
|
| + ASSERT_TRUE(image.HasRepresentation(1.0f));
|
| EXPECT_EQ(16, image.width());
|
| EXPECT_EQ(16, image.height());
|
| EXPECT_EQ(SK_ColorGREEN, GetColor1x(image));
|
| @@ -118,8 +119,8 @@ TEST(SelectFaviconFramesTest, _16From16_Scale2x_32_From_16) {
|
|
|
| gfx::ImageSkia image = SelectFaviconFrames(bitmaps, Scale1x2x(), 16, NULL);
|
| EXPECT_EQ(2u, image.image_reps().size());
|
| - ASSERT_TRUE(image.HasRepresentation(ui::SCALE_FACTOR_100P));
|
| - ASSERT_TRUE(image.HasRepresentation(ui::SCALE_FACTOR_200P));
|
| + ASSERT_TRUE(image.HasRepresentation(1.0f));
|
| + ASSERT_TRUE(image.HasRepresentation(2.0f));
|
| EXPECT_EQ(16, image.width());
|
| EXPECT_EQ(16, image.height());
|
| EXPECT_EQ(SK_ColorGREEN, GetColor1x(image));
|
| @@ -133,8 +134,8 @@ TEST(SelectFaviconFramesTest, _16From16_Scale2x_32_From_32) {
|
|
|
| gfx::ImageSkia image = SelectFaviconFrames(bitmaps, Scale1x2x(), 16, NULL);
|
| EXPECT_EQ(2u, image.image_reps().size());
|
| - ASSERT_TRUE(image.HasRepresentation(ui::SCALE_FACTOR_100P));
|
| - ASSERT_TRUE(image.HasRepresentation(ui::SCALE_FACTOR_200P));
|
| + ASSERT_TRUE(image.HasRepresentation(1.0f));
|
| + ASSERT_TRUE(image.HasRepresentation(2.0f));
|
| EXPECT_EQ(16, image.width());
|
| EXPECT_EQ(16, image.height());
|
| EXPECT_EQ(SK_ColorGREEN, GetColor1x(image));
|
|
|