| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/browser/extensions/extensions_service_unittest.h" | 5 #include "chrome/browser/extensions/extensions_service_unittest.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| (...skipping 1698 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1709 Extension* good = service_->extensions()->at(0); | 1709 Extension* good = service_->extensions()->at(0); |
| 1710 | 1710 |
| 1711 EXPECT_FALSE(good->is_theme()); | 1711 EXPECT_FALSE(good->is_theme()); |
| 1712 | 1712 |
| 1713 // Use AddPendingExtensionInternal() as AddPendingExtension() would | 1713 // Use AddPendingExtensionInternal() as AddPendingExtension() would |
| 1714 // balk. | 1714 // balk. |
| 1715 service_->AddPendingExtensionInternal( | 1715 service_->AddPendingExtensionInternal( |
| 1716 good->id(), good->update_url(), | 1716 good->id(), good->update_url(), |
| 1717 PendingExtensionInfo::EXTENSION, | 1717 PendingExtensionInfo::EXTENSION, |
| 1718 kGoodIsFromSync, kGoodInstallSilently, kGoodInitialState, | 1718 kGoodIsFromSync, kGoodInstallSilently, kGoodInitialState, |
| 1719 kGoodInitialIncognitoEnabled); | 1719 kGoodInitialIncognitoEnabled, Extension::INTERNAL); |
| 1720 UpdateExtension(good->id(), path, INSTALLED); | 1720 UpdateExtension(good->id(), path, INSTALLED); |
| 1721 | 1721 |
| 1722 EXPECT_FALSE(ContainsKey(service_->pending_extensions(), kGoodId)); | 1722 EXPECT_FALSE(ContainsKey(service_->pending_extensions(), kGoodId)); |
| 1723 } | 1723 } |
| 1724 | 1724 |
| 1725 // Test pref settings for blacklist and unblacklist extensions. | 1725 // Test pref settings for blacklist and unblacklist extensions. |
| 1726 TEST_F(ExtensionsServiceTest, SetUnsetBlacklistInPrefs) { | 1726 TEST_F(ExtensionsServiceTest, SetUnsetBlacklistInPrefs) { |
| 1727 InitializeEmptyExtensionsService(); | 1727 InitializeEmptyExtensionsService(); |
| 1728 std::vector<std::string> blacklist; | 1728 std::vector<std::string> blacklist; |
| 1729 blacklist.push_back(good0); | 1729 blacklist.push_back(good0); |
| (...skipping 938 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2668 // Component extensions shouldn't get recourded in the prefs. | 2668 // Component extensions shouldn't get recourded in the prefs. |
| 2669 ValidatePrefKeyCount(0); | 2669 ValidatePrefKeyCount(0); |
| 2670 | 2670 |
| 2671 // Reload all extensions, and make sure it comes back. | 2671 // Reload all extensions, and make sure it comes back. |
| 2672 std::string extension_id = service_->extensions()->at(0)->id(); | 2672 std::string extension_id = service_->extensions()->at(0)->id(); |
| 2673 loaded_.clear(); | 2673 loaded_.clear(); |
| 2674 service_->ReloadExtensions(); | 2674 service_->ReloadExtensions(); |
| 2675 ASSERT_EQ(1u, service_->extensions()->size()); | 2675 ASSERT_EQ(1u, service_->extensions()->size()); |
| 2676 EXPECT_EQ(extension_id, service_->extensions()->at(0)->id()); | 2676 EXPECT_EQ(extension_id, service_->extensions()->at(0)->id()); |
| 2677 } | 2677 } |
| OLD | NEW |