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

Side by Side Diff: sync/engine/model_type_worker_unittest.cc

Issue 1933803002: [Sync] USS: Ignore encryption changes during conflict resolution 2/2 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix comment. Created 4 years, 7 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 unified diff | Download patch
« no previous file with comments | « sync/engine/model_type_worker.cc ('k') | sync/engine/non_blocking_type_commit_contribution.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "sync/engine/model_type_worker.h" 5 #include "sync/engine/model_type_worker.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <utility> 10 #include <utility>
(...skipping 702 matching lines...) Expand 10 before | Expand all | Expand 10 after
713 ASSERT_TRUE(HasCommitResponseOnModelThread("tag1")); 713 ASSERT_TRUE(HasCommitResponseOnModelThread("tag1"));
714 const CommitResponseData& commit_response = 714 const CommitResponseData& commit_response =
715 GetCommitResponseOnModelThread("tag1"); 715 GetCommitResponseOnModelThread("tag1");
716 716
717 // The ID changes in a commit response to initial commit. 717 // The ID changes in a commit response to initial commit.
718 EXPECT_FALSE(commit_response.id.empty()); 718 EXPECT_FALSE(commit_response.id.empty());
719 EXPECT_NE(entity.id_string(), commit_response.id); 719 EXPECT_NE(entity.id_string(), commit_response.id);
720 720
721 EXPECT_EQ(client_tag_hash, commit_response.client_tag_hash); 721 EXPECT_EQ(client_tag_hash, commit_response.client_tag_hash);
722 EXPECT_LT(0, commit_response.response_version); 722 EXPECT_LT(0, commit_response.response_version);
723 EXPECT_LT(0, commit_response.sequence_number);
724 EXPECT_FALSE(commit_response.specifics_hash.empty());
723 } 725 }
724 726
725 TEST_F(ModelTypeWorkerTest, SimpleDelete) { 727 TEST_F(ModelTypeWorkerTest, SimpleDelete) {
726 NormalInitialize(); 728 NormalInitialize();
727 729
728 // We can't delete an entity that was never committed. 730 // We can't delete an entity that was never committed.
729 // Step 1 is to create and commit a new entity. 731 // Step 1 is to create and commit a new entity.
730 CommitRequest("tag1", "value1"); 732 CommitRequest("tag1", "value1");
731 EXPECT_EQ(1, GetNumCommitNudges()); 733 EXPECT_EQ(1, GetNumCommitNudges());
732 ASSERT_TRUE(WillCommit()); 734 ASSERT_TRUE(WillCommit());
(...skipping 478 matching lines...) Expand 10 before | Expand all | Expand 10 after
1211 // disconnected. 1213 // disconnected.
1212 TEST_F(ModelTypeWorkerTest, DisconnectProcessorFromSyncTest) { 1214 TEST_F(ModelTypeWorkerTest, DisconnectProcessorFromSyncTest) {
1213 // Initialize the worker with basic state. 1215 // Initialize the worker with basic state.
1214 NormalInitialize(); 1216 NormalInitialize();
1215 EXPECT_FALSE(IsProcessorDisconnected()); 1217 EXPECT_FALSE(IsProcessorDisconnected());
1216 ResetWorker(); 1218 ResetWorker();
1217 EXPECT_TRUE(IsProcessorDisconnected()); 1219 EXPECT_TRUE(IsProcessorDisconnected());
1218 } 1220 }
1219 1221
1220 } // namespace syncer_v2 1222 } // namespace syncer_v2
OLDNEW
« no previous file with comments | « sync/engine/model_type_worker.cc ('k') | sync/engine/non_blocking_type_commit_contribution.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698