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

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: Added a preference for creation_flags, Also added creation_flags check in ReloadExtensions unittest Created 8 years, 3 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..db7aa3b49ddb52445e91cf182333763a9578ecd6 100644
--- a/chrome/browser/extensions/extension_service_unittest.cc
+++ b/chrome/browser/extensions/extension_service_unittest.cc
@@ -3394,7 +3394,8 @@ TEST_F(ExtensionServiceTest, ReloadExtensions) {
// Simple extension that should install without error.
FilePath path = data_dir_.AppendASCII("good.crx");
- InstallCRX(path, INSTALL_NEW);
+ InstallCRX(path, INSTALL_NEW,
+ Extension::FROM_BOOKMARK | Extension::FROM_WEBSTORE);
const char* extension_id = good_crx;
service_->DisableExtension(extension_id, Extension::DISABLE_USER_ACTION);
@@ -3403,6 +3404,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_EQ(true, extension->from_bookmark());
Mihai Parparita -not on Chrome 2012/09/29 00:22:25 Nit: These can be EXPECT_TRUE/EXPECT_FALSE.
Gaurav 2012/10/01 22:09:36 Done.
+ EXPECT_EQ(true, extension->from_webstore());
+ EXPECT_EQ(false, extension->was_installed_by_default());
+
// Extension counts shouldn't change.
EXPECT_EQ(0u, service_->extensions()->size());
EXPECT_EQ(1u, service_->disabled_extensions()->size());

Powered by Google App Engine
This is Rietveld 408576698