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

Unified Diff: chrome/browser/extensions/extension_service_unittest.cc

Issue 10977048: Fix bug in disabling sync for default apps (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Fix browser and integration tests, which got broken Created 8 years, 2 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/extensions/extension_service_unittest.cc
diff --git a/chrome/browser/extensions/extension_service_unittest.cc b/chrome/browser/extensions/extension_service_unittest.cc
index a9ae43c2620636b4f5259cbdf3b5a8577493607c..61ceb5fa7599608d8a70b31b84d3b83183dfc4a5 100644
--- a/chrome/browser/extensions/extension_service_unittest.cc
+++ b/chrome/browser/extensions/extension_service_unittest.cc
@@ -3391,10 +3391,12 @@ TEST_F(ExtensionServiceTest, DisableAllExtensions) {
// Tests reloading extensions.
TEST_F(ExtensionServiceTest, ReloadExtensions) {
InitializeEmptyExtensionService();
+ InitializeRequestContext();
// Simple extension that should install without error.
FilePath path = data_dir_.AppendASCII("good.crx");
- InstallCRX(path, INSTALL_NEW);
+ InstallCRX(path, INSTALL_NEW,
+ Extension::FROM_WEBSTORE | Extension::WAS_INSTALLED_BY_DEFAULT);
const char* extension_id = good_crx;
service_->DisableExtension(extension_id, Extension::DISABLE_USER_ACTION);
@@ -3403,6 +3405,12 @@ TEST_F(ExtensionServiceTest, ReloadExtensions) {
service_->ReloadExtensions();
+ // The creation flags should not change when reloading the extension.
+ const Extension* extension = service_->GetExtensionById(good_crx, true);
+ EXPECT_TRUE(extension->from_webstore());
+ EXPECT_TRUE(extension->was_installed_by_default());
+ EXPECT_FALSE(extension->from_bookmark());
+
// Extension counts shouldn't change.
EXPECT_EQ(0u, service_->extensions()->size());
EXPECT_EQ(1u, service_->disabled_extensions()->size());
« no previous file with comments | « chrome/browser/extensions/extension_service.cc ('k') | chrome/browser/extensions/extension_sorting_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698