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

Unified Diff: sync/internal_api/js_sync_manager_observer_unittest.cc

Issue 10804039: Make SyncBackendRegistrar aware of loaded data (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 8 years, 5 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 side-by-side diff with in-line comments
Download patch
Index: sync/internal_api/js_sync_manager_observer_unittest.cc
diff --git a/sync/internal_api/js_sync_manager_observer_unittest.cc b/sync/internal_api/js_sync_manager_observer_unittest.cc
index 72ea4f3b23018fcf07c7ad0d7444e188563c838e..5e51bf4ad5ee06fbedd05be2f6f4b7f618738903 100644
--- a/sync/internal_api/js_sync_manager_observer_unittest.cc
+++ b/sync/internal_api/js_sync_manager_observer_unittest.cc
@@ -48,22 +48,33 @@ TEST_F(JsSyncManagerObserverTest, NoArgNotifiations) {
InSequence dummy;
EXPECT_CALL(mock_js_event_handler_,
- HandleJsEvent("onInitializationComplete",
- HasDetails(JsEventDetails())));
- EXPECT_CALL(mock_js_event_handler_,
HandleJsEvent("onStopSyncingPermanently",
HasDetails(JsEventDetails())));
EXPECT_CALL(mock_js_event_handler_,
HandleJsEvent("onEncryptionComplete",
HasDetails(JsEventDetails())));
- js_sync_manager_observer_.OnInitializationComplete(WeakHandle<JsBackend>(),
- true);
js_sync_manager_observer_.OnStopSyncingPermanently();
js_sync_manager_observer_.OnEncryptionComplete();
PumpLoop();
}
+TEST_F(JsSyncManagerObserverTest, OnInitializationComplete) {
+ DictionaryValue expected_details;
+ syncer::ModelTypeSet restored_types;
+ restored_types.Put(BOOKMARKS);
+ restored_types.Put(NIGORI);
+ expected_details.Set("restoredTypes", ModelTypeSetToValue(restored_types));
+
+ EXPECT_CALL(mock_js_event_handler_,
+ HandleJsEvent("onInitializationComplete",
+ HasDetailsAsDictionary(expected_details)));
+
+ js_sync_manager_observer_.OnInitializationComplete(
+ WeakHandle<JsBackend>(), true, restored_types);
+ PumpLoop();
+}
+
TEST_F(JsSyncManagerObserverTest, OnSyncCycleCompleted) {
ModelTypePayloadMap download_progress_markers;
sessions::SyncSessionSnapshot snapshot(sessions::ModelNeutralState(),
« no previous file with comments | « sync/internal_api/js_sync_manager_observer.cc ('k') | sync/internal_api/public/internal_components_factory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698