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

Side by Side Diff: chrome/browser/sync/js/js_sync_manager_observer_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, 11 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/js/js_sync_manager_observer.h" 5 #include "chrome/browser/sync/js/js_sync_manager_observer.h"
6 6
7 #include "base/basictypes.h" 7 #include "base/basictypes.h"
8 #include "base/location.h" 8 #include "base/location.h"
9 #include "base/message_loop.h" 9 #include "base/message_loop.h"
10 #include "base/values.h" 10 #include "base/values.h"
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 syncable::ModelTypeSet(), 80 syncable::ModelTypeSet(),
81 download_progress_markers, 81 download_progress_markers,
82 false, 82 false,
83 true, 83 true,
84 100, 84 100,
85 8, 85 8,
86 5, 86 5,
87 false, 87 false,
88 sessions::SyncSourceInfo(), 88 sessions::SyncSourceInfo(),
89 0, 89 0,
90 base::Time::Now()); 90 base::Time::Now(),
91 false);
91 DictionaryValue expected_details; 92 DictionaryValue expected_details;
92 expected_details.Set("snapshot", snapshot.ToValue()); 93 expected_details.Set("snapshot", snapshot.ToValue());
93 94
94 EXPECT_CALL(mock_js_event_handler_, 95 EXPECT_CALL(mock_js_event_handler_,
95 HandleJsEvent("onSyncCycleCompleted", 96 HandleJsEvent("onSyncCycleCompleted",
96 HasDetailsAsDictionary(expected_details))); 97 HasDetailsAsDictionary(expected_details)));
97 98
98 js_sync_manager_observer_.OnSyncCycleCompleted(&snapshot); 99 js_sync_manager_observer_.OnSyncCycleCompleted(&snapshot);
99 PumpLoop(); 100 PumpLoop();
100 } 101 }
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
218 HandleJsEvent("onEncryptedTypesChanged", 219 HandleJsEvent("onEncryptedTypesChanged",
219 HasDetailsAsDictionary(expected_details))); 220 HasDetailsAsDictionary(expected_details)));
220 221
221 js_sync_manager_observer_.OnEncryptedTypesChanged( 222 js_sync_manager_observer_.OnEncryptedTypesChanged(
222 encrypted_types, encrypt_everything); 223 encrypted_types, encrypt_everything);
223 PumpLoop(); 224 PumpLoop();
224 } 225 }
225 226
226 } // namespace 227 } // namespace
227 } // namespace browser_sync 228 } // namespace browser_sync
OLDNEW
« no previous file with comments | « chrome/browser/sync/glue/sync_backend_host_unittest.cc ('k') | chrome/browser/sync/profile_sync_service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698