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

Unified Diff: chrome/browser/extensions/image_loading_tracker_unittest.cc

Issue 10086023: Expose array of bitmaps contained by gfx::Image similar to NSImage (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 8 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
« no previous file with comments | « no previous file | chrome/browser/themes/browser_theme_pack.cc » ('j') | ui/gfx/image/image.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/image_loading_tracker_unittest.cc
diff --git a/chrome/browser/extensions/image_loading_tracker_unittest.cc b/chrome/browser/extensions/image_loading_tracker_unittest.cc
index 67be34f1db09858e9746a01f46e613e2a57af143..2e4d052b9142e3b130ec002ff322f98d1f621122 100644
--- a/chrome/browser/extensions/image_loading_tracker_unittest.cc
+++ b/chrome/browser/extensions/image_loading_tracker_unittest.cc
@@ -16,6 +16,7 @@
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/skia/include/core/SkBitmap.h"
#include "ui/gfx/image/image.h"
+#include "ui/gfx/image/image_skia.h"
#include "ui/gfx/size.h"
using content::BrowserThread;
@@ -212,9 +213,10 @@ TEST_F(ImageLoadingTrackerTest, MultipleImages) {
EXPECT_EQ(1, image_loaded_count());
// Check that all images were loaded.
- ASSERT_EQ(2u, image_.GetNumberOfSkBitmaps());
- const SkBitmap* bmp1 = image_.GetSkBitmapAtIndex(0);
- const SkBitmap* bmp2 = image_.GetSkBitmapAtIndex(1);
+ const gfx::ImageSkia* image_skia = image.ToImageSkia();
+ ASSERT_EQ(2u, image_skia->GetNumberOfBitmaps());
+ const SkBitmap* bmp1 = image_skia->GetBitmapAtIndex(0);
+ const SkBitmap* bmp2 = image_skia->GetBitmapAtIndex(1);
if (bmp1->width() > bmp2->width()) {
std::swap(bmp1, bmp2);
}
« no previous file with comments | « no previous file | chrome/browser/themes/browser_theme_pack.cc » ('j') | ui/gfx/image/image.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698