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

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

Issue 7744057: Do not attempt to apply app sync updates to extensions with matching ID, or vice versa. (Closed) Base URL: svn://svn.chromium.org/chrome/branches/835/src
Patch Set: Created 9 years, 4 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
« no previous file with comments | « chrome/browser/extensions/extension_service.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 484d0797b2198e997db0fb1fcbf4923af1e1c454..8180f964070e31f3f9508065f67990be49e4aa55 100644
--- a/chrome/browser/extensions/extension_service_unittest.cc
+++ b/chrome/browser/extensions/extension_service_unittest.cc
@@ -3540,6 +3540,29 @@ TEST_F(ExtensionServiceTest, ProcessSyncDataUninstall) {
service_->ProcessSyncData(extension_sync_data, &AllExtensions);
}
+TEST_F(ExtensionServiceTest, ProcessSyncDataWrongType) {
+ InitializeEmptyExtensionService();
+
+ ExtensionSyncData extension_sync_data;
+ extension_sync_data.id = good_crx;
+ extension_sync_data.uninstalled = true;
+
+ // Install the extension.
+ FilePath extension_path = data_dir_.AppendASCII("good.crx");
+ InstallCrx(extension_path, true);
+ EXPECT_TRUE(service_->GetExtensionById(good_crx, true));
+
+ // Should do nothing
+ service_->ProcessSyncData(extension_sync_data, &ThemesOnly);
+ EXPECT_TRUE(service_->GetExtensionById(good_crx, true));
+
+ extension_sync_data.uninstalled = false;
+ extension_sync_data.enabled = false;
+
+ // Should again do nothing.
+ service_->ProcessSyncData(extension_sync_data, &ThemesOnly);
+ EXPECT_TRUE(service_->GetExtensionById(good_crx, false));
+}
TEST_F(ExtensionServiceTest, ProcessSyncDataSettings) {
InitializeEmptyExtensionService();
« no previous file with comments | « chrome/browser/extensions/extension_service.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698