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

Side by Side Diff: chrome/browser/sync/internal_api/js_sync_manager_observer_unittest.cc

Issue 10038041: sync: Loop committing items without downloading updates (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 8 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/internal_api/js_sync_manager_observer.h" 5 #include "chrome/browser/sync/internal_api/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 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 TEST_F(JsSyncManagerObserverTest, OnSyncCycleCompleted) { 74 TEST_F(JsSyncManagerObserverTest, OnSyncCycleCompleted) {
75 std::string download_progress_markers[syncable::MODEL_TYPE_COUNT]; 75 std::string download_progress_markers[syncable::MODEL_TYPE_COUNT];
76 sessions::SyncSessionSnapshot snapshot(sessions::SyncerStatus(), 76 sessions::SyncSessionSnapshot snapshot(sessions::SyncerStatus(),
77 sessions::ErrorCounters(), 77 sessions::ErrorCounters(),
78 100, 78 100,
79 false, 79 false,
80 syncable::ModelTypeSet(), 80 syncable::ModelTypeSet(),
81 download_progress_markers, 81 download_progress_markers,
82 false, 82 false,
83 true, 83 true,
84 100,
85 8, 84 8,
86 5, 85 5,
87 2, 86 2,
88 7, 87 7,
89 false,
90 sessions::SyncSourceInfo(), 88 sessions::SyncSourceInfo(),
91 false, 89 false,
92 0, 90 0,
93 base::Time::Now(), 91 base::Time::Now(),
94 false); 92 false);
95 DictionaryValue expected_details; 93 DictionaryValue expected_details;
96 expected_details.Set("snapshot", snapshot.ToValue()); 94 expected_details.Set("snapshot", snapshot.ToValue());
97 95
98 EXPECT_CALL(mock_js_event_handler_, 96 EXPECT_CALL(mock_js_event_handler_,
99 HandleJsEvent("onSyncCycleCompleted", 97 HandleJsEvent("onSyncCycleCompleted",
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
212 HandleJsEvent("onEncryptedTypesChanged", 210 HandleJsEvent("onEncryptedTypesChanged",
213 HasDetailsAsDictionary(expected_details))); 211 HasDetailsAsDictionary(expected_details)));
214 212
215 js_sync_manager_observer_.OnEncryptedTypesChanged( 213 js_sync_manager_observer_.OnEncryptedTypesChanged(
216 encrypted_types, encrypt_everything); 214 encrypted_types, encrypt_everything);
217 PumpLoop(); 215 PumpLoop();
218 } 216 }
219 217
220 } // namespace 218 } // namespace
221 } // namespace browser_sync 219 } // namespace browser_sync
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698