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

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

Issue 11786003: Move Icons out of Extension class (Closed) Base URL: http://git.chromium.org/chromium/src.git@dc_unref_browser_action
Patch Set: Latest master + Yoyo's requests Created 7 years, 11 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
diff --git a/chrome/browser/extensions/image_loading_tracker_unittest.cc b/chrome/browser/extensions/image_loading_tracker_unittest.cc
index 5754d942f01efbde90a6674de76756f4f909c3ba..7ce36b033c8ffe25e820c9b95622412d91e2d540 100644
--- a/chrome/browser/extensions/image_loading_tracker_unittest.cc
+++ b/chrome/browser/extensions/image_loading_tracker_unittest.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Copyright (c) 2013 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -9,6 +9,7 @@
#include "base/path_service.h"
#include "chrome/common/chrome_notification_types.h"
#include "chrome/common/chrome_paths.h"
+#include "chrome/common/extensions/api/icons/icons_handler.h"
#include "chrome/common/extensions/extension.h"
#include "chrome/common/extensions/extension_constants.h"
#include "chrome/common/extensions/extension_icon_set.h"
@@ -114,9 +115,10 @@ TEST_F(ImageLoadingTrackerTest, Cache) {
"image_loading_tracker", Extension::INVALID));
ASSERT_TRUE(extension.get() != NULL);
- ExtensionResource image_resource =
- extension->GetIconResource(extension_misc::EXTENSION_ICON_SMALLISH,
- ExtensionIconSet::MATCH_EXACTLY);
+ ExtensionResource image_resource = extensions::IconsInfo::GetIconResource(
+ extension,
+ extension_misc::EXTENSION_ICON_SMALLISH,
+ ExtensionIconSet::MATCH_EXACTLY);
gfx::Size max_size(extension_misc::EXTENSION_ICON_SMALLISH,
extension_misc::EXTENSION_ICON_SMALLISH);
ImageLoadingTracker loader(this);
@@ -164,9 +166,10 @@ TEST_F(ImageLoadingTrackerTest, DeleteExtensionWhileWaitingForCache) {
"image_loading_tracker", Extension::INVALID));
ASSERT_TRUE(extension.get() != NULL);
- ExtensionResource image_resource =
- extension->GetIconResource(extension_misc::EXTENSION_ICON_SMALLISH,
- ExtensionIconSet::MATCH_EXACTLY);
+ ExtensionResource image_resource = extensions::IconsInfo::GetIconResource(
+ extension,
+ extension_misc::EXTENSION_ICON_SMALLISH,
+ ExtensionIconSet::MATCH_EXACTLY);
ImageLoadingTracker loader(this);
loader.LoadImage(extension.get(),
image_resource,
@@ -210,8 +213,8 @@ TEST_F(ImageLoadingTrackerTest, MultipleImages) {
int sizes[] = {extension_misc::EXTENSION_ICON_SMALLISH,
extension_misc::EXTENSION_ICON_BITTY};
for (size_t i = 0; i < arraysize(sizes); ++i) {
- ExtensionResource resource =
- extension->GetIconResource(sizes[i], ExtensionIconSet::MATCH_EXACTLY);
+ ExtensionResource resource = extensions::IconsInfo::GetIconResource(
+ extension, sizes[i], ExtensionIconSet::MATCH_EXACTLY);
info_list.push_back(ImageLoadingTracker::ImageRepresentation(
resource,
ImageLoadingTracker::ImageRepresentation::RESIZE_WHEN_LARGER,

Powered by Google App Engine
This is Rietveld 408576698