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

Unified Diff: chrome/browser/themes/browser_theme_pack_unittest.cc

Issue 24175004: Remove dependency on ui::ScaleFactor from ui/gfx (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rename methods and vars to make image_scale more clear 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: chrome/browser/themes/browser_theme_pack_unittest.cc
diff --git a/chrome/browser/themes/browser_theme_pack_unittest.cc b/chrome/browser/themes/browser_theme_pack_unittest.cc
index b2fd658e4acada05ae34ac29e3211ef753d1b845..6766c6c7df36013cb9657a4ddf3912caadd34ed3 100644
--- a/chrome/browser/themes/browser_theme_pack_unittest.cc
+++ b/chrome/browser/themes/browser_theme_pack_unittest.cc
@@ -270,8 +270,7 @@ class BrowserThemePackTest : public ::testing::Test {
const gfx::ImageSkia* image_skia = image.ToImageSkia();
ASSERT_TRUE(image_skia);
// Scale 100%.
- const gfx::ImageSkiaRep& rep1 = image_skia->GetRepresentation(
- ui::SCALE_FACTOR_100P);
+ const gfx::ImageSkiaRep& rep1 = image_skia->GetRepresentation(1.0f);
ASSERT_FALSE(rep1.is_null());
EXPECT_EQ(80, rep1.sk_bitmap().width());
EXPECT_EQ(80, rep1.sk_bitmap().height());
@@ -283,8 +282,7 @@ class BrowserThemePackTest : public ::testing::Test {
EXPECT_EQ(SkColorSetRGB( 0, 241, 237), rep1.sk_bitmap().getColor(32, 32));
rep1.sk_bitmap().unlockPixels();
// Scale 200%.
- const gfx::ImageSkiaRep& rep2 = image_skia->GetRepresentation(
- ui::SCALE_FACTOR_200P);
+ const gfx::ImageSkiaRep& rep2 = image_skia->GetRepresentation(2.0f);
ASSERT_FALSE(rep2.is_null());
EXPECT_EQ(160, rep2.sk_bitmap().width());
EXPECT_EQ(160, rep2.sk_bitmap().height());
@@ -312,8 +310,7 @@ class BrowserThemePackTest : public ::testing::Test {
image_skia = image.ToImageSkia();
ASSERT_TRUE(image_skia);
// Scale 100%.
- const gfx::ImageSkiaRep& rep3 = image_skia->GetRepresentation(
- ui::SCALE_FACTOR_100P);
+ const gfx::ImageSkiaRep& rep3 = image_skia->GetRepresentation(1.0f);
ASSERT_FALSE(rep3.is_null());
EXPECT_EQ(80, rep3.sk_bitmap().width());
EXPECT_EQ(80, rep3.sk_bitmap().height());
@@ -335,8 +332,7 @@ class BrowserThemePackTest : public ::testing::Test {
EXPECT_EQ(static_cast<size_t>(9), normal.size());
rep3.sk_bitmap().unlockPixels();
// Scale 200%.
- const gfx::ImageSkiaRep& rep4 = image_skia->GetRepresentation(
- ui::SCALE_FACTOR_200P);
+ const gfx::ImageSkiaRep& rep4 = image_skia->GetRepresentation(2.0f);
ASSERT_FALSE(rep4.is_null());
EXPECT_EQ(160, rep4.sk_bitmap().width());
EXPECT_EQ(160, rep4.sk_bitmap().height());

Powered by Google App Engine
This is Rietveld 408576698