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

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

Issue 7621085: Server directed error handling backend code. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: For review. Created 9 years, 4 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 144 matching lines...) Expand 10 before | Expand all | Expand 10 after
155 initial_sync_ended, 155 initial_sync_ended,
156 download_progress_markers, 156 download_progress_markers,
157 kHasMoreToSync, 157 kHasMoreToSync,
158 kIsSilenced, 158 kIsSilenced,
159 kUnsyncedCount, 159 kUnsyncedCount,
160 kNumBlockingConflictingUpdates, 160 kNumBlockingConflictingUpdates,
161 kNumConflictingUpdates, 161 kNumConflictingUpdates,
162 kDidCommitItems, 162 kDidCommitItems,
163 source, 163 source,
164 0, 164 0,
165 base::Time::Now()); 165 base::Time::Now(),
166 SyncProtocolError());
166 scoped_ptr<DictionaryValue> value(snapshot.ToValue()); 167 scoped_ptr<DictionaryValue> value(snapshot.ToValue());
167 EXPECT_EQ(14u, value->size()); 168 EXPECT_EQ(14u, value->size());
168 ExpectDictDictionaryValue(*expected_syncer_status_value, *value, 169 ExpectDictDictionaryValue(*expected_syncer_status_value, *value,
169 "syncerStatus"); 170 "syncerStatus");
170 ExpectDictDictionaryValue(*expected_errors_value, *value, "errors"); 171 ExpectDictDictionaryValue(*expected_errors_value, *value, "errors");
171 ExpectDictIntegerValue(kNumServerChangesRemaining, *value, 172 ExpectDictIntegerValue(kNumServerChangesRemaining, *value,
172 "numServerChangesRemaining"); 173 "numServerChangesRemaining");
173 ExpectDictBooleanValue(kIsShareUsable, *value, "isShareUsable"); 174 ExpectDictBooleanValue(kIsShareUsable, *value, "isShareUsable");
174 ExpectDictListValue(*expected_initial_sync_ended_value, *value, 175 ExpectDictListValue(*expected_initial_sync_ended_value, *value,
175 "initialSyncEnded"); 176 "initialSyncEnded");
176 ExpectDictDictionaryValue(*expected_download_progress_markers_value, 177 ExpectDictDictionaryValue(*expected_download_progress_markers_value,
177 *value, "downloadProgressMarkers"); 178 *value, "downloadProgressMarkers");
178 ExpectDictBooleanValue(kHasMoreToSync, *value, "hasMoreToSync"); 179 ExpectDictBooleanValue(kHasMoreToSync, *value, "hasMoreToSync");
179 ExpectDictBooleanValue(kIsSilenced, *value, "isSilenced"); 180 ExpectDictBooleanValue(kIsSilenced, *value, "isSilenced");
180 ExpectDictIntegerValue(kUnsyncedCount, *value, "unsyncedCount"); 181 ExpectDictIntegerValue(kUnsyncedCount, *value, "unsyncedCount");
181 ExpectDictIntegerValue(kNumBlockingConflictingUpdates, *value, 182 ExpectDictIntegerValue(kNumBlockingConflictingUpdates, *value,
182 "numBlockingConflictingUpdates"); 183 "numBlockingConflictingUpdates");
183 ExpectDictIntegerValue(kNumConflictingUpdates, *value, 184 ExpectDictIntegerValue(kNumConflictingUpdates, *value,
184 "numConflictingUpdates"); 185 "numConflictingUpdates");
185 ExpectDictBooleanValue(kDidCommitItems, *value, 186 ExpectDictBooleanValue(kDidCommitItems, *value,
186 "didCommitItems"); 187 "didCommitItems");
187 ExpectDictDictionaryValue(*expected_source_value, *value, "source"); 188 ExpectDictDictionaryValue(*expected_source_value, *value, "source");
188 } 189 }
189 190
190 } // namespace 191 } // namespace
191 } // namespace sessions 192 } // namespace sessions
192 } // namespace browser_sync 193 } // namespace browser_sync
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698