| Index: chrome/browser/ui/toolbar/back_forward_menu_model_unittest.cc
|
| diff --git a/chrome/browser/ui/toolbar/back_forward_menu_model_unittest.cc b/chrome/browser/ui/toolbar/back_forward_menu_model_unittest.cc
|
| index cb8e775ce95650edcc0d73d53ab586cd5aa308fc..6eb5b688352b5fde29999971c6e19fecbc254893 100644
|
| --- a/chrome/browser/ui/toolbar/back_forward_menu_model_unittest.cc
|
| +++ b/chrome/browser/ui/toolbar/back_forward_menu_model_unittest.cc
|
| @@ -509,9 +509,9 @@ TEST_F(BackFwdMenuModelTest, FaviconLoadTest) {
|
| back_model.set_test_web_contents(controller().GetWebContents());
|
| back_model.SetMenuModelDelegate(&favicon_delegate);
|
|
|
| - SkBitmap new_icon(CreateBitmap(SK_ColorRED));
|
| + SkBitmap new_icon_bitmap(CreateBitmap(SK_ColorRED));
|
| std::vector<unsigned char> icon_data;
|
| - gfx::PNGCodec::EncodeBGRASkBitmap(new_icon, false, &icon_data);
|
| + gfx::PNGCodec::EncodeBGRASkBitmap(new_icon_bitmap, false, &icon_data);
|
|
|
| GURL url1 = GURL("http://www.a.com/1");
|
| GURL url2 = GURL("http://www.a.com/2");
|
| @@ -529,7 +529,7 @@ TEST_F(BackFwdMenuModelTest, FaviconLoadTest) {
|
|
|
| // Will return the current icon (default) but start an anync call
|
| // to retrieve the favicon from the favicon service.
|
| - SkBitmap default_icon;
|
| + gfx::ImageSkia default_icon;
|
| back_model.GetIconAt(0, &default_icon);
|
|
|
| // Make the favicon service run GetFavIconForURL,
|
| @@ -540,22 +540,27 @@ TEST_F(BackFwdMenuModelTest, FaviconLoadTest) {
|
| EXPECT_TRUE(favicon_delegate.was_called());
|
|
|
| // Verify the bitmaps match.
|
| - SkBitmap valid_icon;
|
| + gfx::ImageSkia valid_icon;
|
| // This time we will get the new favicon returned.
|
| back_model.GetIconAt(0, &valid_icon);
|
| - SkAutoLockPixels a(new_icon);
|
| - SkAutoLockPixels b(valid_icon);
|
| - SkAutoLockPixels c(default_icon);
|
| +
|
| + SkBitmap default_icon_bitmap = *default_icon.bitmap();
|
| + SkBitmap valid_icon_bitmap = *valid_icon.bitmap();
|
| +
|
| + SkAutoLockPixels a(new_icon_bitmap);
|
| + SkAutoLockPixels b(valid_icon_bitmap);
|
| + SkAutoLockPixels c(default_icon_bitmap);
|
| // Verify we did not get the default favicon.
|
| - EXPECT_NE(0, memcmp(default_icon.getPixels(), valid_icon.getPixels(),
|
| - default_icon.getSize()));
|
| + EXPECT_NE(0, memcmp(default_icon_bitmap.getPixels(),
|
| + valid_icon_bitmap.getPixels(),
|
| + default_icon_bitmap.getSize()));
|
| // Verify we did get the expected favicon.
|
| - EXPECT_EQ(0, memcmp(new_icon.getPixels(), valid_icon.getPixels(),
|
| - new_icon.getSize()));
|
| + EXPECT_EQ(0, memcmp(new_icon_bitmap.getPixels(),
|
| + valid_icon_bitmap.getPixels(),
|
| + new_icon_bitmap.getSize()));
|
|
|
| // Make sure the browser deconstructor doesn't have problems.
|
| browser.CloseAllTabs();
|
| // This is required to prevent the message loop from hanging.
|
| profile()->DestroyHistoryService();
|
| }
|
| -
|
|
|