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

Side by Side Diff: chrome/browser/extensions/convert_web_app_browsertest.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: Created 7 years, 9 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
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 <string> 5 #include <string>
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "chrome/browser/extensions/extension_service.h" 8 #include "chrome/browser/extensions/extension_service.h"
9 #include "chrome/browser/profiles/profile.h" 9 #include "chrome/browser/profiles/profile.h"
10 #include "chrome/browser/ui/browser.h" 10 #include "chrome/browser/ui/browser.h"
11 #include "chrome/common/chrome_notification_types.h" 11 #include "chrome/common/chrome_notification_types.h"
12 #include "chrome/common/chrome_switches.h" 12 #include "chrome/common/chrome_switches.h"
13 #include "chrome/common/extensions/api/icons/icons_handler.h"
13 #include "chrome/common/extensions/extension.h" 14 #include "chrome/common/extensions/extension.h"
15 #include "chrome/common/extensions/extension_icon_set.h"
14 #include "chrome/common/extensions/permissions/permission_set.h" 16 #include "chrome/common/extensions/permissions/permission_set.h"
15 #include "chrome/test/base/in_process_browser_test.h" 17 #include "chrome/test/base/in_process_browser_test.h"
16 #include "chrome/test/base/ui_test_utils.h" 18 #include "chrome/test/base/ui_test_utils.h"
17 #include "content/public/browser/notification_details.h" 19 #include "content/public/browser/notification_details.h"
18 #include "content/public/browser/notification_observer.h" 20 #include "content/public/browser/notification_observer.h"
19 #include "content/public/browser/notification_registrar.h" 21 #include "content/public/browser/notification_registrar.h"
20 #include "content/public/browser/notification_service.h" 22 #include "content/public/browser/notification_service.h"
21 23
22 namespace extensions { 24 namespace extensions {
23 25
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 EXPECT_EQ("the description is", installed_extension_->description()); 77 EXPECT_EQ("the description is", installed_extension_->description());
76 EXPECT_EQ(extension_misc::LAUNCH_PANEL, 78 EXPECT_EQ(extension_misc::LAUNCH_PANEL,
77 installed_extension_->launch_container()); 79 installed_extension_->launch_container());
78 80
79 ASSERT_EQ(2u, installed_extension_->GetActivePermissions()->apis().size()); 81 ASSERT_EQ(2u, installed_extension_->GetActivePermissions()->apis().size());
80 EXPECT_TRUE(installed_extension_->HasAPIPermission( 82 EXPECT_TRUE(installed_extension_->HasAPIPermission(
81 APIPermission::kGeolocation)); 83 APIPermission::kGeolocation));
82 EXPECT_TRUE(installed_extension_->HasAPIPermission( 84 EXPECT_TRUE(installed_extension_->HasAPIPermission(
83 APIPermission::kNotification)); 85 APIPermission::kNotification));
84 86
85 ASSERT_EQ(3u, installed_extension_->icons().map().size()); 87 const ExtensionIconSet& icons = IconsInfo::GetIcons(installed_extension_);
86 EXPECT_EQ("icons/16.png", installed_extension_->icons().Get( 88 ASSERT_EQ(3u, icons.map().size());
87 16, ExtensionIconSet::MATCH_EXACTLY)); 89 EXPECT_EQ("icons/16.png", icons.Get(16, ExtensionIconSet::MATCH_EXACTLY));
88 EXPECT_EQ("icons/48.png", installed_extension_->icons().Get( 90 EXPECT_EQ("icons/48.png", icons.Get(48, ExtensionIconSet::MATCH_EXACTLY));
89 48, ExtensionIconSet::MATCH_EXACTLY)); 91 EXPECT_EQ("icons/128.png", icons.Get(128, ExtensionIconSet::MATCH_EXACTLY));
90 EXPECT_EQ("icons/128.png", installed_extension_->icons().Get(
91 128, ExtensionIconSet::MATCH_EXACTLY));
92 } 92 }
93 93
94 } // namespace extensions 94 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698