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

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

Issue 2867008: Show extension icons next to their top-level context menu items.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 6 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/extensions/image_loading_tracker_unittest.cc
===================================================================
--- chrome/browser/extensions/image_loading_tracker_unittest.cc (revision 50770)
+++ chrome/browser/extensions/image_loading_tracker_unittest.cc (working copy)
@@ -102,11 +102,12 @@
ExtensionResource image_resource =
extension->GetIconPath(Extension::EXTENSION_ICON_SMALLISH);
+ gfx::Size max_size(Extension::EXTENSION_ICON_SMALLISH,
+ Extension::EXTENSION_ICON_SMALLISH);
ImageLoadingTracker loader(static_cast<ImageLoadingTracker::Observer*>(this));
loader.LoadImage(extension.get(),
image_resource,
- gfx::Size(Extension::EXTENSION_ICON_SMALLISH,
- Extension::EXTENSION_ICON_SMALLISH),
+ max_size,
ImageLoadingTracker::CACHE);
// The image isn't cached, so we should not have received notification.
@@ -121,17 +122,16 @@
EXPECT_EQ(Extension::EXTENSION_ICON_SMALLISH, image_.width());
// The image should be cached in the Extension.
- EXPECT_TRUE(extension->HasCachedImage(image_resource));
+ EXPECT_TRUE(extension->HasCachedImage(image_resource, max_size));
// Make sure the image is in the extension.
EXPECT_EQ(Extension::EXTENSION_ICON_SMALLISH,
- extension->GetCachedImage(image_resource).width());
+ extension->GetCachedImage(image_resource, max_size).width());
// Ask the tracker for the image again, this should call us back immediately.
loader.LoadImage(extension.get(),
image_resource,
- gfx::Size(Extension::EXTENSION_ICON_SMALLISH,
- Extension::EXTENSION_ICON_SMALLISH),
+ max_size,
ImageLoadingTracker::CACHE);
// We should have gotten the image.
EXPECT_EQ(1, image_loaded_count());
« no previous file with comments | « chrome/browser/extensions/image_loading_tracker.cc ('k') | chrome/browser/tab_contents/render_view_context_menu.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698