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

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

Issue 10837214: Refactor ModelTypePayloadMap and ObjectIdPayloadMap to StateMaps. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 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) 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/internal_api/js_sync_manager_observer.h" 5 #include "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 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 EXPECT_CALL(mock_js_event_handler_, 69 EXPECT_CALL(mock_js_event_handler_,
70 HandleJsEvent("onInitializationComplete", 70 HandleJsEvent("onInitializationComplete",
71 HasDetailsAsDictionary(expected_details))); 71 HasDetailsAsDictionary(expected_details)));
72 72
73 js_sync_manager_observer_.OnInitializationComplete( 73 js_sync_manager_observer_.OnInitializationComplete(
74 WeakHandle<JsBackend>(), true, restored_types); 74 WeakHandle<JsBackend>(), true, restored_types);
75 PumpLoop(); 75 PumpLoop();
76 } 76 }
77 77
78 TEST_F(JsSyncManagerObserverTest, OnSyncCycleCompleted) { 78 TEST_F(JsSyncManagerObserverTest, OnSyncCycleCompleted) {
79 ModelTypePayloadMap download_progress_markers; 79 ModelTypeStateMap download_progress_markers;
80 sessions::SyncSessionSnapshot snapshot(sessions::ModelNeutralState(), 80 sessions::SyncSessionSnapshot snapshot(sessions::ModelNeutralState(),
81 false, 81 false,
82 ModelTypeSet(), 82 ModelTypeSet(),
83 download_progress_markers, 83 download_progress_markers,
84 false, 84 false,
85 true, 85 true,
86 8, 86 8,
87 5, 87 5,
88 2, 88 2,
89 7, 89 7,
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
209 HandleJsEvent("onEncryptedTypesChanged", 209 HandleJsEvent("onEncryptedTypesChanged",
210 HasDetailsAsDictionary(expected_details))); 210 HasDetailsAsDictionary(expected_details)));
211 211
212 js_sync_manager_observer_.OnEncryptedTypesChanged( 212 js_sync_manager_observer_.OnEncryptedTypesChanged(
213 encrypted_types, encrypt_everything); 213 encrypted_types, encrypt_everything);
214 PumpLoop(); 214 PumpLoop();
215 } 215 }
216 216
217 } // namespace 217 } // namespace
218 } // namespace syncer 218 } // namespace syncer
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698