| Index: sync/engine/apply_updates_command_unittest.cc
|
| diff --git a/sync/engine/apply_updates_command_unittest.cc b/sync/engine/apply_updates_command_unittest.cc
|
| index b261c1dcd32127c0e26511ff5f9b964692aa78bb..ff59363d1d58d2107333bb38b79c94fa0778117d 100644
|
| --- a/sync/engine/apply_updates_command_unittest.cc
|
| +++ b/sync/engine/apply_updates_command_unittest.cc
|
| @@ -82,8 +82,6 @@ TEST_F(ApplyUpdatesCommandTest, Simple) {
|
| apply_updates_command_.ExecuteImpl(session());
|
|
|
| const sessions::StatusController& status = session()->status_controller();
|
| - EXPECT_EQ(0, status.num_simple_conflicts())
|
| - << "Simple update shouldn't result in conflicts";
|
| EXPECT_EQ(0, status.num_encryption_conflicts())
|
| << "Simple update shouldn't result in conflicts";
|
| EXPECT_EQ(0, status.num_hierarchy_conflicts())
|
| @@ -111,8 +109,6 @@ TEST_F(ApplyUpdatesCommandTest, UpdateWithChildrenBeforeParents) {
|
| apply_updates_command_.ExecuteImpl(session());
|
|
|
| const sessions::StatusController& status = session()->status_controller();
|
| - EXPECT_EQ(0, status.num_simple_conflicts())
|
| - << "Simple update shouldn't result in conflicts, even if out-of-order";
|
| EXPECT_EQ(5, status.num_updates_applied())
|
| << "All updates should have been successfully applied";
|
| }
|
| @@ -128,8 +124,10 @@ TEST_F(ApplyUpdatesCommandTest, SimpleConflict) {
|
| apply_updates_command_.ExecuteImpl(session());
|
|
|
| const sessions::StatusController& status = session()->status_controller();
|
| - EXPECT_EQ(1, status.num_simple_conflicts())
|
| - << "Unsynced and unapplied item should be a simple conflict";
|
| + EXPECT_EQ(1, status.num_server_overwrites())
|
| + << "Unsynced and unapplied item conflict should be resolved";
|
| + EXPECT_EQ(0, status.num_updates_applied())
|
| + << "Update should not be applied; we should override the server.";
|
| }
|
|
|
| // Runs the ApplyUpdatesCommand on an item that has both local and remote
|
| @@ -156,11 +154,7 @@ TEST_F(ApplyUpdatesCommandTest, HierarchyAndSimpleConflict) {
|
| apply_updates_command_.ExecuteImpl(session());
|
|
|
| const sessions::StatusController& status = session()->status_controller();
|
| -
|
| - // An update that is both a simple conflict and a hierarchy conflict should be
|
| - // treated as a hierarchy conflict.
|
| EXPECT_EQ(1, status.num_hierarchy_conflicts());
|
| - EXPECT_EQ(0, status.num_simple_conflicts());
|
| }
|
|
|
|
|
| @@ -202,7 +196,6 @@ TEST_F(ApplyUpdatesCommandTest, HierarchyConflictDirectoryLoop) {
|
|
|
| // This should count as a hierarchy conflict.
|
| EXPECT_EQ(1, status.num_hierarchy_conflicts());
|
| - EXPECT_EQ(0, status.num_simple_conflicts());
|
| }
|
|
|
| // Runs the ApplyUpdatesCommand on a directory where the server sent us an
|
| @@ -234,7 +227,6 @@ TEST_F(ApplyUpdatesCommandTest, HierarchyConflictDeletedParent) {
|
|
|
| const sessions::StatusController& status = session()->status_controller();
|
| EXPECT_EQ(1, status.num_hierarchy_conflicts());
|
| - EXPECT_EQ(0, status.num_simple_conflicts());
|
| }
|
|
|
| // Runs the ApplyUpdatesCommand on a directory where the server is trying to
|
| @@ -273,7 +265,6 @@ TEST_F(ApplyUpdatesCommandTest, HierarchyConflictDeleteNonEmptyDirectory) {
|
| const sessions::StatusController& status = session()->status_controller();
|
| // This should count as a hierarchy conflict.
|
| EXPECT_EQ(1, status.num_hierarchy_conflicts());
|
| - EXPECT_EQ(0, status.num_simple_conflicts());
|
| }
|
|
|
| // Runs the ApplyUpdatesCommand on a server-created item that has a locally
|
| @@ -290,9 +281,6 @@ TEST_F(ApplyUpdatesCommandTest, HierarchyConflictUnknownParent) {
|
| apply_updates_command_.ExecuteImpl(session());
|
|
|
| const sessions::StatusController& status = session()->status_controller();
|
| - EXPECT_EQ(0, status.num_simple_conflicts())
|
| - << "Updates with unknown parent should not be treated as 'simple'"
|
| - << " conflicts";
|
| EXPECT_EQ(2, status.num_hierarchy_conflicts())
|
| << "All updates with an unknown ancestors should be in conflict";
|
| EXPECT_EQ(0, status.num_updates_applied())
|
| @@ -350,8 +338,6 @@ TEST_F(ApplyUpdatesCommandTest, DecryptablePassword) {
|
| apply_updates_command_.ExecuteImpl(session());
|
|
|
| const sessions::StatusController& status = session()->status_controller();
|
| - EXPECT_EQ(0, status.num_simple_conflicts())
|
| - << "No update should be in conflict because they're all decryptable";
|
| EXPECT_EQ(1, status.num_updates_applied())
|
| << "The updates that can be decrypted should be applied";
|
| }
|
| @@ -373,11 +359,6 @@ TEST_F(ApplyUpdatesCommandTest, UndecryptableData) {
|
| apply_updates_command_.ExecuteImpl(session());
|
|
|
| const sessions::StatusController& status = session()->status_controller();
|
| - EXPECT_TRUE(status.HasConflictingUpdates())
|
| - << "Updates that can't be decrypted should trigger the syncer to have "
|
| - << "conflicting updates.";
|
| - EXPECT_EQ(0, status.num_simple_conflicts())
|
| - << "Updates that can't be decrypted should not be in regular conflict";
|
| EXPECT_EQ(3, status.num_encryption_conflicts())
|
| << "Updates that can't be decrypted should be in encryption conflict";
|
| EXPECT_EQ(0, status.num_updates_applied())
|
| @@ -422,12 +403,6 @@ TEST_F(ApplyUpdatesCommandTest, SomeUndecryptablePassword) {
|
| apply_updates_command_.ExecuteImpl(session());
|
|
|
| const sessions::StatusController& status = session()->status_controller();
|
| - EXPECT_TRUE(status.HasConflictingUpdates())
|
| - << "Updates that can't be decrypted should trigger the syncer to have "
|
| - << "conflicting updates.";
|
| - EXPECT_EQ(0, status.num_simple_conflicts())
|
| - << "The updates that can't be decrypted should not be in regular "
|
| - << "conflict";
|
| EXPECT_EQ(1, status.num_encryption_conflicts())
|
| << "The updates that can't be decrypted should be in encryption "
|
| << "conflict";
|
|
|