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

Side by Side Diff: sync/sessions/status_controller_unittest.cc

Issue 10523003: Refactor following sync commit loop change (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Another rebase Created 8 years, 6 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 | Annotate | Revision Log
« no previous file with comments | « sync/sessions/status_controller.cc ('k') | sync/sessions/sync_session.cc » ('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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/sessions/sync_session.h" 5 #include "sync/sessions/sync_session.h"
6 #include "sync/test/engine/test_id_factory.h" 6 #include "sync/test/engine/test_id_factory.h"
7 #include "testing/gtest/include/gtest/gtest.h" 7 #include "testing/gtest/include/gtest/gtest.h"
8 8
9 namespace browser_sync { 9 namespace browser_sync {
10 namespace sessions { 10 namespace sessions {
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 status.set_invalid_store(true); 59 status.set_invalid_store(true);
60 EXPECT_TRUE(status.syncer_status().invalid_store); 60 EXPECT_TRUE(status.syncer_status().invalid_store);
61 61
62 EXPECT_FALSE(status.conflicts_resolved()); 62 EXPECT_FALSE(status.conflicts_resolved());
63 status.update_conflicts_resolved(true); 63 status.update_conflicts_resolved(true);
64 EXPECT_TRUE(status.conflicts_resolved()); 64 EXPECT_TRUE(status.conflicts_resolved());
65 65
66 status.set_last_download_updates_result(SYNCER_OK); 66 status.set_last_download_updates_result(SYNCER_OK);
67 EXPECT_EQ(SYNCER_OK, status.error().last_download_updates_result); 67 EXPECT_EQ(SYNCER_OK, status.error().last_download_updates_result);
68 68
69 status.set_last_post_commit_result(SYNC_AUTH_ERROR); 69 status.set_commit_result(SYNC_AUTH_ERROR);
70 EXPECT_EQ(SYNC_AUTH_ERROR, status.error().last_post_commit_result); 70 EXPECT_EQ(SYNC_AUTH_ERROR, status.error().commit_result);
71
72 status.set_last_process_commit_response_result(SYNC_SERVER_ERROR);
73 EXPECT_EQ(SYNC_SERVER_ERROR,
74 status.error().last_process_commit_response_result);
75 71
76 for (int i = 0; i < 14; i++) 72 for (int i = 0; i < 14; i++)
77 status.increment_num_successful_commits(); 73 status.increment_num_successful_commits();
78 EXPECT_EQ(14, status.syncer_status().num_successful_commits); 74 EXPECT_EQ(14, status.syncer_status().num_successful_commits);
79 } 75 }
80 76
81 TEST_F(StatusControllerTest, HasConflictingUpdates) { 77 TEST_F(StatusControllerTest, HasConflictingUpdates) {
82 StatusController status(routes_); 78 StatusController status(routes_);
83 EXPECT_FALSE(status.HasConflictingUpdates()); 79 EXPECT_FALSE(status.HasConflictingUpdates());
84 { 80 {
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
160 status.error(); 156 status.error();
161 status.syncer_status(); 157 status.syncer_status();
162 status.num_server_changes_remaining(); 158 status.num_server_changes_remaining();
163 status.download_updates_succeeded(); 159 status.download_updates_succeeded();
164 status.ServerSaysNothingMoreToDownload(); 160 status.ServerSaysNothingMoreToDownload();
165 status.group_restriction(); 161 status.group_restriction();
166 } 162 }
167 163
168 } // namespace sessions 164 } // namespace sessions
169 } // namespace browser_sync 165 } // namespace browser_sync
OLDNEW
« no previous file with comments | « sync/sessions/status_controller.cc ('k') | sync/sessions/sync_session.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698