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

Side by Side Diff: chrome/browser/sync/sessions/session_state_unittest.cc

Issue 9235040: [Sync] Handle errors during first sync gracefully. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Upload before commit. Created 8 years, 10 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
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 "chrome/browser/sync/sessions/session_state.h" 5 #include "chrome/browser/sync/sessions/session_state.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/base64.h" 9 #include "base/base64.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after
150 initial_sync_ended, 150 initial_sync_ended,
151 download_progress_markers, 151 download_progress_markers,
152 kHasMoreToSync, 152 kHasMoreToSync,
153 kIsSilenced, 153 kIsSilenced,
154 kUnsyncedCount, 154 kUnsyncedCount,
155 kNumBlockingConflictingUpdates, 155 kNumBlockingConflictingUpdates,
156 kNumConflictingUpdates, 156 kNumConflictingUpdates,
157 kDidCommitItems, 157 kDidCommitItems,
158 source, 158 source,
159 0, 159 0,
160 base::Time::Now()); 160 base::Time::Now(),
161 false);
161 scoped_ptr<DictionaryValue> value(snapshot.ToValue()); 162 scoped_ptr<DictionaryValue> value(snapshot.ToValue());
162 EXPECT_EQ(14u, value->size()); 163 EXPECT_EQ(14u, value->size());
163 ExpectDictDictionaryValue(*expected_syncer_status_value, *value, 164 ExpectDictDictionaryValue(*expected_syncer_status_value, *value,
164 "syncerStatus"); 165 "syncerStatus");
165 ExpectDictDictionaryValue(*expected_errors_value, *value, "errors"); 166 ExpectDictDictionaryValue(*expected_errors_value, *value, "errors");
166 ExpectDictIntegerValue(kNumServerChangesRemaining, *value, 167 ExpectDictIntegerValue(kNumServerChangesRemaining, *value,
167 "numServerChangesRemaining"); 168 "numServerChangesRemaining");
168 ExpectDictBooleanValue(kIsShareUsable, *value, "isShareUsable"); 169 ExpectDictBooleanValue(kIsShareUsable, *value, "isShareUsable");
169 ExpectDictListValue(*expected_initial_sync_ended_value, *value, 170 ExpectDictListValue(*expected_initial_sync_ended_value, *value,
170 "initialSyncEnded"); 171 "initialSyncEnded");
171 ExpectDictDictionaryValue(*expected_download_progress_markers_value, 172 ExpectDictDictionaryValue(*expected_download_progress_markers_value,
172 *value, "downloadProgressMarkers"); 173 *value, "downloadProgressMarkers");
173 ExpectDictBooleanValue(kHasMoreToSync, *value, "hasMoreToSync"); 174 ExpectDictBooleanValue(kHasMoreToSync, *value, "hasMoreToSync");
174 ExpectDictBooleanValue(kIsSilenced, *value, "isSilenced"); 175 ExpectDictBooleanValue(kIsSilenced, *value, "isSilenced");
175 ExpectDictIntegerValue(kUnsyncedCount, *value, "unsyncedCount"); 176 ExpectDictIntegerValue(kUnsyncedCount, *value, "unsyncedCount");
176 ExpectDictIntegerValue(kNumBlockingConflictingUpdates, *value, 177 ExpectDictIntegerValue(kNumBlockingConflictingUpdates, *value,
177 "numBlockingConflictingUpdates"); 178 "numBlockingConflictingUpdates");
178 ExpectDictIntegerValue(kNumConflictingUpdates, *value, 179 ExpectDictIntegerValue(kNumConflictingUpdates, *value,
179 "numConflictingUpdates"); 180 "numConflictingUpdates");
180 ExpectDictBooleanValue(kDidCommitItems, *value, 181 ExpectDictBooleanValue(kDidCommitItems, *value,
181 "didCommitItems"); 182 "didCommitItems");
182 ExpectDictDictionaryValue(*expected_source_value, *value, "source"); 183 ExpectDictDictionaryValue(*expected_source_value, *value, "source");
183 } 184 }
184 185
185 } // namespace 186 } // namespace
186 } // namespace sessions 187 } // namespace sessions
187 } // namespace browser_sync 188 } // namespace browser_sync
OLDNEW
« no previous file with comments | « chrome/browser/sync/sessions/session_state.cc ('k') | chrome/browser/sync/sessions/sync_session.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698