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

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

Issue 1778923003: Fix extensions sync in cases where items change type (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: review feedback Created 4 years, 9 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 | « no previous file | chrome/browser/extensions/extension_service_sync_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/extension_disabled_ui_browsertest.cc
diff --git a/chrome/browser/extensions/extension_disabled_ui_browsertest.cc b/chrome/browser/extensions/extension_disabled_ui_browsertest.cc
index 4466ade1b7a7293c0ca33011e9b39aa7bdaa3cb8..823ea854666aa29d8e0a7a7ea559dbe123ae09ed 100644
--- a/chrome/browser/extensions/extension_disabled_ui_browsertest.cc
+++ b/chrome/browser/extensions/extension_disabled_ui_browsertest.cc
@@ -30,6 +30,8 @@
#include "extensions/common/extension.h"
#include "extensions/test/extension_test_message_listener.h"
#include "net/url_request/test_url_request_interceptor.h"
+#include "sync/api/fake_sync_change_processor.h"
+#include "sync/api/sync_error_factory_mock.h"
#include "sync/protocol/extension_specifics.pb.h"
#include "sync/protocol/sync.pb.h"
@@ -213,6 +215,10 @@ IN_PROC_BROWSER_TEST_F(ExtensionDisabledGlobalErrorTest,
GURL("http://localhost/autoupdate/v2.crx"),
scoped_temp_dir_.path().AppendASCII("permissions2.crx"));
+ sync_service->MergeDataAndStartSyncing(
+ syncer::EXTENSIONS, syncer::SyncDataList(),
+ make_scoped_ptr(new syncer::FakeSyncChangeProcessor()),
+ make_scoped_ptr(new syncer::SyncErrorFactoryMock()));
extensions::TestExtensionRegistryObserver install_observer(registry_);
sync_service->ProcessSyncChanges(
FROM_HERE,
@@ -265,12 +271,16 @@ IN_PROC_BROWSER_TEST_F(ExtensionDisabledGlobalErrorTest, RemoteInstall) {
syncer::AttachmentIdList(),
syncer::AttachmentServiceProxy());
+ ExtensionSyncService* sync_service = ExtensionSyncService::Get(profile());
+ sync_service->MergeDataAndStartSyncing(
+ syncer::EXTENSIONS, syncer::SyncDataList(),
+ make_scoped_ptr(new syncer::FakeSyncChangeProcessor()),
+ make_scoped_ptr(new syncer::SyncErrorFactoryMock()));
extensions::TestExtensionRegistryObserver install_observer(registry_);
- ExtensionSyncService::Get(profile())->ProcessSyncChanges(
+ sync_service->ProcessSyncChanges(
FROM_HERE,
syncer::SyncChangeList(
- 1, syncer::SyncChange(FROM_HERE,
- syncer::SyncChange::ACTION_ADD,
+ 1, syncer::SyncChange(FROM_HERE, syncer::SyncChange::ACTION_ADD,
sync_data)));
install_observer.WaitForExtensionWillBeInstalled();
« no previous file with comments | « no previous file | chrome/browser/extensions/extension_service_sync_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698