OLD | NEW |
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" |
(...skipping 25 matching lines...) Expand all Loading... |
36 ExtensionFromWebAppTest() : installed_extension_(NULL) { | 36 ExtensionFromWebAppTest() : installed_extension_(NULL) { |
37 } | 37 } |
38 | 38 |
39 std::string expected_extension_id_; | 39 std::string expected_extension_id_; |
40 const Extension* installed_extension_; | 40 const Extension* installed_extension_; |
41 | 41 |
42 private: | 42 private: |
43 // content::NotificationObserver | 43 // content::NotificationObserver |
44 virtual void Observe(int type, | 44 virtual void Observe(int type, |
45 const content::NotificationSource& source, | 45 const content::NotificationSource& source, |
46 const content::NotificationDetails& details) OVERRIDE { | 46 const content::NotificationDetails& details) override { |
47 if (type == | 47 if (type == |
48 extensions::NOTIFICATION_EXTENSION_WILL_BE_INSTALLED_DEPRECATED) { | 48 extensions::NOTIFICATION_EXTENSION_WILL_BE_INSTALLED_DEPRECATED) { |
49 const Extension* extension = | 49 const Extension* extension = |
50 content::Details<const InstalledExtensionInfo>(details)->extension; | 50 content::Details<const InstalledExtensionInfo>(details)->extension; |
51 if (extension->id() == expected_extension_id_) { | 51 if (extension->id() == expected_extension_id_) { |
52 installed_extension_ = extension; | 52 installed_extension_ = extension; |
53 base::MessageLoopForUI::current()->Quit(); | 53 base::MessageLoopForUI::current()->Quit(); |
54 } | 54 } |
55 } | 55 } |
56 } | 56 } |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
95 AppLaunchInfo::GetLaunchContainer(installed_extension_)); | 95 AppLaunchInfo::GetLaunchContainer(installed_extension_)); |
96 EXPECT_EQ(0u, | 96 EXPECT_EQ(0u, |
97 installed_extension_->permissions_data() | 97 installed_extension_->permissions_data() |
98 ->active_permissions() | 98 ->active_permissions() |
99 ->apis() | 99 ->apis() |
100 .size()); | 100 .size()); |
101 EXPECT_EQ(0u, IconsInfo::GetIcons(installed_extension_).map().size()); | 101 EXPECT_EQ(0u, IconsInfo::GetIcons(installed_extension_).map().size()); |
102 } | 102 } |
103 | 103 |
104 } // namespace extensions | 104 } // namespace extensions |
OLD | NEW |