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 "chrome/browser/extensions/extension_service_unittest.h" | 5 #include "chrome/browser/extensions/extension_service_unittest.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <set> | 8 #include <set> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 2685 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2696 const Extension* extension = service_->GetExtensionById(theme_crx, true); | 2696 const Extension* extension = service_->GetExtensionById(theme_crx, true); |
2697 ASSERT_TRUE(extension); | 2697 ASSERT_TRUE(extension); |
2698 | 2698 |
2699 EXPECT_FALSE( | 2699 EXPECT_FALSE( |
2700 service_->extension_prefs()->IsExtensionDisabled(extension->id())); | 2700 service_->extension_prefs()->IsExtensionDisabled(extension->id())); |
2701 EXPECT_TRUE(service_->IsExtensionEnabled(theme_crx)); | 2701 EXPECT_TRUE(service_->IsExtensionEnabled(theme_crx)); |
2702 } | 2702 } |
2703 | 2703 |
2704 #if defined(OS_CHROMEOS) | 2704 #if defined(OS_CHROMEOS) |
2705 // Always fails on ChromeOS: http://crbug.com/79737 | 2705 // Always fails on ChromeOS: http://crbug.com/79737 |
2706 #define MAYBE_UpdatePendingExternalCrx FAILS_UpdatePendingExternalCrx | 2706 #define MAYBE_UpdatePendingExternalCrx DISABLED_UpdatePendingExternalCrx |
2707 #else | 2707 #else |
2708 #define MAYBE_UpdatePendingExternalCrx UpdatePendingExternalCrx | 2708 #define MAYBE_UpdatePendingExternalCrx UpdatePendingExternalCrx |
2709 #endif | 2709 #endif |
2710 // Test updating a pending CRX as if the source is an external extension | 2710 // Test updating a pending CRX as if the source is an external extension |
2711 // with an update URL. In this case we don't know if the CRX is a theme | 2711 // with an update URL. In this case we don't know if the CRX is a theme |
2712 // or not. | 2712 // or not. |
2713 TEST_F(ExtensionServiceTest, DISABLED_MAYBE_UpdatePendingExternalCrx) { | 2713 TEST_F(ExtensionServiceTest, DISABLED_MAYBE_UpdatePendingExternalCrx) { |
2714 InitializeEmptyExtensionService(); | 2714 InitializeEmptyExtensionService(); |
2715 EXPECT_TRUE(service_->pending_extension_manager()->AddFromExternalUpdateUrl( | 2715 EXPECT_TRUE(service_->pending_extension_manager()->AddFromExternalUpdateUrl( |
2716 theme_crx, GURL(), Extension::EXTERNAL_PREF_DOWNLOAD)); | 2716 theme_crx, GURL(), Extension::EXTERNAL_PREF_DOWNLOAD)); |
(...skipping 3021 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5738 EXPECT_FALSE(extensions::HasExternalInstallError(service_)); | 5738 EXPECT_FALSE(extensions::HasExternalInstallError(service_)); |
5739 EXPECT_FALSE(service_->IsExtensionEnabled(good_crx)); | 5739 EXPECT_FALSE(service_->IsExtensionEnabled(good_crx)); |
5740 EXPECT_TRUE(service_->IsExtensionEnabled(page_action)); | 5740 EXPECT_TRUE(service_->IsExtensionEnabled(page_action)); |
5741 | 5741 |
5742 ExtensionPrefs* prefs = service_->extension_prefs(); | 5742 ExtensionPrefs* prefs = service_->extension_prefs(); |
5743 EXPECT_NE(0, prefs->GetDisableReasons(good_crx) & | 5743 EXPECT_NE(0, prefs->GetDisableReasons(good_crx) & |
5744 Extension::DISABLE_SIDELOAD_WIPEOUT); | 5744 Extension::DISABLE_SIDELOAD_WIPEOUT); |
5745 EXPECT_EQ(0, prefs->GetDisableReasons(page_action) & | 5745 EXPECT_EQ(0, prefs->GetDisableReasons(page_action) & |
5746 Extension::DISABLE_SIDELOAD_WIPEOUT); | 5746 Extension::DISABLE_SIDELOAD_WIPEOUT); |
5747 } | 5747 } |
OLD | NEW |