Skip to content

Commit

Permalink
Sync: unit test for allow two delete device records
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexeyBarabash committed Jan 14, 2019
1 parent 5727b58 commit a826eeb
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions components/brave_sync/brave_sync_service_unittest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -456,6 +456,13 @@ TEST_F(BraveSyncServiceTest, OnDeleteDevice) {
auto resolved_record = SyncRecord::Clone(*records.at(2));
resolved_record->action = jslib::SyncRecord::Action::A_DELETE;
resolved_records.push_back(std::move(resolved_record));

// Emulate we have twice the same delete device record to ensure we
// don't have failed DCHECK in debug build
auto resolved_record2 = SyncRecord::Clone(*records.at(2));
resolved_record2->action = jslib::SyncRecord::Action::A_DELETE;
resolved_records.push_back(std::move(resolved_record2));

EXPECT_CALL(*observer(), OnSyncStateChanged(sync_service())).Times(1);
sync_service()->OnResolvedPreferences(resolved_records);

Expand Down

0 comments on commit a826eeb

Please sign in to comment.