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

Unified Diff: trunk/src/chrome/browser/history/select_favicon_frames_unittest.cc

Issue 24262008: Revert 224473 "Remove dependency on ui::ScaleFactor from ui/gfx" (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 7 years, 3 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 side-by-side diff with in-line comments
Download patch
Index: trunk/src/chrome/browser/history/select_favicon_frames_unittest.cc
===================================================================
--- trunk/src/chrome/browser/history/select_favicon_frames_unittest.cc (revision 224497)
+++ trunk/src/chrome/browser/history/select_favicon_frames_unittest.cc (working copy)
@@ -43,8 +43,7 @@
SkColor GetColor(const gfx::ImageSkia& image, ui::ScaleFactor factor,
int x = -1, int y = -1) {
- const SkBitmap& bitmap =
- image.GetRepresentation(ui::GetImageScale(factor)).sk_bitmap();
+ const SkBitmap& bitmap = image.GetRepresentation(factor).sk_bitmap();
if (x == -1)
x = bitmap.width() / 2;
if (y == -1)
@@ -72,7 +71,7 @@
gfx::ImageSkia image = SelectFaviconFrames(bitmaps,
SizesFromBitmaps(bitmaps), Scale1x(), 0, NULL);
EXPECT_EQ(1u, image.image_reps().size());
- ASSERT_TRUE(image.HasRepresentation(1.0f));
+ ASSERT_TRUE(image.HasRepresentation(ui::SCALE_FACTOR_100P));
EXPECT_EQ(48, image.width());
EXPECT_EQ(48, image.height());
@@ -88,7 +87,7 @@
gfx::ImageSkia image = SelectFaviconFrames(bitmaps,
SizesFromBitmaps(bitmaps), Scale1x(), 16, NULL);
EXPECT_EQ(1u, image.image_reps().size());
- ASSERT_TRUE(image.HasRepresentation(1.0f));
+ ASSERT_TRUE(image.HasRepresentation(ui::SCALE_FACTOR_100P));
EXPECT_EQ(16, image.width());
EXPECT_EQ(16, image.height());
EXPECT_EQ(SK_ColorGREEN, GetColor1x(image));
@@ -103,7 +102,7 @@
gfx::ImageSkia image = SelectFaviconFrames(bitmaps,
SizesFromBitmaps(bitmaps), Scale1x(), 16, NULL);
EXPECT_EQ(1u, image.image_reps().size());
- ASSERT_TRUE(image.HasRepresentation(1.0f));
+ ASSERT_TRUE(image.HasRepresentation(ui::SCALE_FACTOR_100P));
EXPECT_EQ(16, image.width());
EXPECT_EQ(16, image.height());
EXPECT_EQ(SK_ColorGREEN, GetColor1x(image));
@@ -119,7 +118,7 @@
gfx::ImageSkia image = SelectFaviconFrames(bitmaps,
SizesFromBitmaps(bitmaps), Scale1x(), 16, NULL);
EXPECT_EQ(1u, image.image_reps().size());
- ASSERT_TRUE(image.HasRepresentation(1.0f));
+ ASSERT_TRUE(image.HasRepresentation(ui::SCALE_FACTOR_100P));
EXPECT_EQ(16, image.width());
EXPECT_EQ(16, image.height());
EXPECT_EQ(SK_ColorGREEN, GetColor1x(image));
@@ -132,8 +131,8 @@
gfx::ImageSkia image = SelectFaviconFrames(bitmaps,
SizesFromBitmaps(bitmaps), Scale1x2x(), 16, NULL);
EXPECT_EQ(2u, image.image_reps().size());
- ASSERT_TRUE(image.HasRepresentation(1.0f));
- ASSERT_TRUE(image.HasRepresentation(2.0f));
+ ASSERT_TRUE(image.HasRepresentation(ui::SCALE_FACTOR_100P));
+ ASSERT_TRUE(image.HasRepresentation(ui::SCALE_FACTOR_200P));
EXPECT_EQ(16, image.width());
EXPECT_EQ(16, image.height());
EXPECT_EQ(SK_ColorGREEN, GetColor1x(image));
@@ -148,8 +147,8 @@
gfx::ImageSkia image = SelectFaviconFrames(bitmaps,
SizesFromBitmaps(bitmaps), Scale1x2x(), 16, NULL);
EXPECT_EQ(2u, image.image_reps().size());
- ASSERT_TRUE(image.HasRepresentation(1.0f));
- ASSERT_TRUE(image.HasRepresentation(2.0f));
+ ASSERT_TRUE(image.HasRepresentation(ui::SCALE_FACTOR_100P));
+ ASSERT_TRUE(image.HasRepresentation(ui::SCALE_FACTOR_200P));
EXPECT_EQ(16, image.width());
EXPECT_EQ(16, image.height());
EXPECT_EQ(SK_ColorGREEN, GetColor1x(image));
« no previous file with comments | « trunk/src/chrome/browser/history/select_favicon_frames.cc ('k') | trunk/src/chrome/browser/profiles/profile_info_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698