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

Side by Side Diff: chrome/common/extensions/extension_icon_set_unittest.cc

Issue 10843014: Generalize ExtensionIconSet to store icon paths for custom size sets (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: .. Created 8 years, 4 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/common/extensions/extension_icon_set.h" 5 #include "chrome/common/extensions/extension_icon_set.h"
6 6
7 #include "testing/gtest/include/gtest/gtest.h" 7 #include "testing/gtest/include/gtest/gtest.h"
8 8
9 namespace {
10
9 TEST(ExtensionIconSet, Basic) { 11 TEST(ExtensionIconSet, Basic) {
10 ExtensionIconSet icons; 12 ExtensionIconSet icons;
11 EXPECT_EQ("", icons.Get(ExtensionIconSet::EXTENSION_ICON_LARGE, 13 EXPECT_EQ("", icons.Get(ExtensionIconSet::EXTENSION_ICON_LARGE,
12 ExtensionIconSet::MATCH_EXACTLY)); 14 ExtensionIconSet::MATCH_EXACTLY));
13 EXPECT_EQ("", icons.Get(ExtensionIconSet::EXTENSION_ICON_LARGE, 15 EXPECT_EQ("", icons.Get(ExtensionIconSet::EXTENSION_ICON_LARGE,
14 ExtensionIconSet::MATCH_BIGGER)); 16 ExtensionIconSet::MATCH_BIGGER));
15 EXPECT_EQ("", icons.Get(ExtensionIconSet::EXTENSION_ICON_LARGE, 17 EXPECT_EQ("", icons.Get(ExtensionIconSet::EXTENSION_ICON_LARGE,
16 ExtensionIconSet::MATCH_SMALLER)); 18 ExtensionIconSet::MATCH_SMALLER));
17 EXPECT_TRUE(icons.map().empty()); 19 EXPECT_TRUE(icons.map().empty());
18 20
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 icons.GetIconSizeFromPath("bar")); 81 icons.GetIconSizeFromPath("bar"));
80 EXPECT_EQ(ExtensionIconSet::EXTENSION_ICON_INVALID, 82 EXPECT_EQ(ExtensionIconSet::EXTENSION_ICON_INVALID,
81 icons.GetIconSizeFromPath("baz")); 83 icons.GetIconSizeFromPath("baz"));
82 EXPECT_EQ(ExtensionIconSet::EXTENSION_ICON_INVALID, 84 EXPECT_EQ(ExtensionIconSet::EXTENSION_ICON_INVALID,
83 icons.GetIconSizeFromPath("")); 85 icons.GetIconSizeFromPath(""));
84 86
85 icons.Clear(); 87 icons.Clear();
86 EXPECT_EQ(ExtensionIconSet::EXTENSION_ICON_INVALID, 88 EXPECT_EQ(ExtensionIconSet::EXTENSION_ICON_INVALID,
87 icons.GetIconSizeFromPath("foo")); 89 icons.GetIconSizeFromPath("foo"));
88 } 90 }
91
92 } // namespace
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698