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

Unified Diff: chrome/common/extensions/api/icons/icons_manifest_unittest.cc

Issue 13460012: Move IconsHandler from c/c/e/api/ to c/c/e (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Latest master for CQ Created 7 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 | « chrome/common/extensions/api/icons/icons_handler.cc ('k') | chrome/common/extensions/extension.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/extensions/api/icons/icons_manifest_unittest.cc
diff --git a/chrome/common/extensions/api/icons/icons_manifest_unittest.cc b/chrome/common/extensions/api/icons/icons_manifest_unittest.cc
deleted file mode 100644
index a27549a4bd545a5c9890c7ebcc24867917db4f2d..0000000000000000000000000000000000000000
--- a/chrome/common/extensions/api/icons/icons_manifest_unittest.cc
+++ /dev/null
@@ -1,63 +0,0 @@
-// 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.
-
-#include "chrome/common/extensions/manifest_tests/extension_manifest_test.h"
-
-#include "base/memory/linked_ptr.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"
-#include "testing/gtest/include/gtest/gtest.h"
-
-namespace extensions {
-
-class IconsManifestTest : public ExtensionManifestTest {
- protected:
- virtual void SetUp() OVERRIDE {
- ExtensionManifestTest::SetUp();
- (new IconsHandler)->Register();
- }
-};
-
-TEST_F(IconsManifestTest, NormalizeIconPaths) {
- scoped_refptr<extensions::Extension> extension(
- LoadAndExpectSuccess("normalize_icon_paths.json"));
- const ExtensionIconSet& icons = IconsInfo::GetIcons(extension);
-
- EXPECT_EQ("16.png", icons.Get(extension_misc::EXTENSION_ICON_BITTY,
- ExtensionIconSet::MATCH_EXACTLY));
- EXPECT_EQ("48.png", icons.Get(extension_misc::EXTENSION_ICON_MEDIUM,
- ExtensionIconSet::MATCH_EXACTLY));
-}
-
-TEST_F(IconsManifestTest, InvalidIconSizes) {
- scoped_refptr<extensions::Extension> extension(
- LoadAndExpectSuccess("init_ignored_icon_size.json"));
- EXPECT_EQ("", IconsInfo::GetIcons(extension).Get(
- 300, ExtensionIconSet::MATCH_EXACTLY));
-}
-
-TEST_F(IconsManifestTest, ValidIconSizes) {
- scoped_refptr<extensions::Extension> extension(
- LoadAndExpectSuccess("init_valid_icon_size.json"));
- const ExtensionIconSet& icons = IconsInfo::GetIcons(extension);
-
- EXPECT_EQ("16.png", icons.Get(extension_misc::EXTENSION_ICON_BITTY,
- ExtensionIconSet::MATCH_EXACTLY));
- EXPECT_EQ("24.png", icons.Get(extension_misc::EXTENSION_ICON_SMALLISH,
- ExtensionIconSet::MATCH_EXACTLY));
- EXPECT_EQ("32.png", icons.Get(extension_misc::EXTENSION_ICON_SMALL,
- ExtensionIconSet::MATCH_EXACTLY));
- EXPECT_EQ("48.png", icons.Get(extension_misc::EXTENSION_ICON_MEDIUM,
- ExtensionIconSet::MATCH_EXACTLY));
- EXPECT_EQ("128.png", icons.Get(extension_misc::EXTENSION_ICON_LARGE,
- ExtensionIconSet::MATCH_EXACTLY));
- EXPECT_EQ("256.png", icons.Get(extension_misc::EXTENSION_ICON_EXTRA_LARGE,
- ExtensionIconSet::MATCH_EXACTLY));
- EXPECT_EQ("512.png", icons.Get(extension_misc::EXTENSION_ICON_GIGANTOR,
- ExtensionIconSet::MATCH_EXACTLY));
-}
-
-} // namespace extensions
« no previous file with comments | « chrome/common/extensions/api/icons/icons_handler.cc ('k') | chrome/common/extensions/extension.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698