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

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: Addresed comments and fixed bugs. Removed not required from_webstore arguement 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..12abc65bfe50f5801a69e69b18252ef3055e775b 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_TRUE(extension->from_bookmark());
+ EXPECT_TRUE(extension->from_webstore());
+ EXPECT_FALSE(extension->was_installed_by_default());
Mihai Parparita -not on Chrome 2012/10/02 17:00:54 Add a test that the was_installed_by_default flag
Gaurav 2012/10/02 23:08:57 Done.
+
// 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