| Index: components/sync/device_info/device_info_sync_bridge_unittest.cc
|
| diff --git a/components/sync/device_info/device_info_sync_bridge_unittest.cc b/components/sync/device_info/device_info_sync_bridge_unittest.cc
|
| index 115166664dbf96858d9130d5ce7a49276e8554ec..583553a2ad252938c87ceeef9ee59372b6b4f99b 100644
|
| --- a/components/sync/device_info/device_info_sync_bridge_unittest.cc
|
| +++ b/components/sync/device_info/device_info_sync_bridge_unittest.cc
|
| @@ -663,6 +663,21 @@ TEST_F(DeviceInfoSyncBridgeTest, MergeLocalGuid) {
|
| EXPECT_TRUE(processor()->put_multimap().empty());
|
| }
|
|
|
| +TEST_F(DeviceInfoSyncBridgeTest, MergeLocalGuidBeforeReconcile) {
|
| + InitializeBridge();
|
| + const DeviceInfoSpecifics specifics = CreateSpecifics(kDefaultLocalSuffix);
|
| +
|
| + // The message loop is never pumped, which means local data/metadata is never
|
| + // loaded, and thus reconcile is never called. The bridge should ignore this
|
| + // EntityData because its cache guid is the same the local device's.
|
| + const SyncError error = bridge()->MergeSyncData(
|
| + bridge()->CreateMetadataChangeList(),
|
| + {{specifics.cache_guid(), SpecificsToEntity(specifics)}});
|
| + EXPECT_FALSE(error.IsSet());
|
| + EXPECT_EQ(0, change_count());
|
| + EXPECT_EQ(0u, bridge()->GetAllDeviceInfo().size());
|
| +}
|
| +
|
| TEST_F(DeviceInfoSyncBridgeTest, CountActiveDevices) {
|
| InitializeAndPump();
|
| EXPECT_EQ(1, bridge()->CountActiveDevices());
|
|
|