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 a2dd82f320805619f615285675f9ea3b3364e69b..1833a1e304edabf1d720935c46802fe02499ab87 100644 |
--- a/chrome/browser/themes/browser_theme_pack_unittest.cc |
+++ b/chrome/browser/themes/browser_theme_pack_unittest.cc |
@@ -287,25 +287,21 @@ class BrowserThemePackTest : public ::testing::Test { |
ASSERT_FALSE(rep1.is_null()); |
EXPECT_EQ(80, rep1.sk_bitmap().width()); |
EXPECT_EQ(80, rep1.sk_bitmap().height()); |
- rep1.sk_bitmap().lockPixels(); |
EXPECT_EQ(SkColorSetRGB(255, 255, 255), rep1.sk_bitmap().getColor(4, 4)); |
EXPECT_EQ(SkColorSetRGB(255, 255, 255), rep1.sk_bitmap().getColor(8, 8)); |
EXPECT_EQ(SkColorSetRGB(0, 241, 237), rep1.sk_bitmap().getColor(16, 16)); |
EXPECT_EQ(SkColorSetRGB(255, 255, 255), rep1.sk_bitmap().getColor(24, 24)); |
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(2.0f); |
ASSERT_FALSE(rep2.is_null()); |
EXPECT_EQ(160, rep2.sk_bitmap().width()); |
EXPECT_EQ(160, rep2.sk_bitmap().height()); |
- rep2.sk_bitmap().lockPixels(); |
EXPECT_EQ(SkColorSetRGB(255, 255, 255), rep2.sk_bitmap().getColor(4, 4)); |
EXPECT_EQ(SkColorSetRGB(223, 42, 0), rep2.sk_bitmap().getColor(8, 8)); |
EXPECT_EQ(SkColorSetRGB(223, 42, 0), rep2.sk_bitmap().getColor(16, 16)); |
EXPECT_EQ(SkColorSetRGB(223, 42, 0), rep2.sk_bitmap().getColor(24, 24)); |
EXPECT_EQ(SkColorSetRGB(255, 255, 255), rep2.sk_bitmap().getColor(32, 32)); |
- rep2.sk_bitmap().unlockPixels(); |
// TODO(sschmitz): I plan to remove the following (to the end of the fct) |
// Reason: this test may be brittle. It depends on details of how we scale |
@@ -327,7 +323,6 @@ class BrowserThemePackTest : public ::testing::Test { |
ASSERT_FALSE(rep3.is_null()); |
EXPECT_EQ(80, rep3.sk_bitmap().width()); |
EXPECT_EQ(80, rep3.sk_bitmap().height()); |
- rep3.sk_bitmap().lockPixels(); |
// We take samples of colors and locations along the diagonal whenever |
// the color changes. Note these colors are slightly different from |
// the input PNG file due to input processing. |
@@ -343,13 +338,11 @@ 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(2.0f); |
ASSERT_FALSE(rep4.is_null()); |
EXPECT_EQ(160, rep4.sk_bitmap().width()); |
EXPECT_EQ(160, rep4.sk_bitmap().height()); |
- rep4.sk_bitmap().lockPixels(); |
// We expect the same colors and at locations scaled by 2 |
// since this bitmap was scaled by 2. |
for (size_t i = 0; i < normal.size(); ++i) { |
@@ -357,7 +350,6 @@ class BrowserThemePackTest : public ::testing::Test { |
SkColor color = normal[i].second; |
EXPECT_EQ(color, rep4.sk_bitmap().getColor(xy, xy)); |
} |
- rep4.sk_bitmap().unlockPixels(); |
} |
base::MessageLoop message_loop; |