Chromium Code Reviews| 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()); |