| 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 31b889b2bf121c0f893df451a0f4fee1022b4344..12f497b70394af54f0abeee569966208c6803958 100644
|
| --- a/sync/internal_api/js_sync_manager_observer_unittest.cc
|
| +++ b/sync/internal_api/js_sync_manager_observer_unittest.cc
|
| @@ -47,9 +47,6 @@ 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_,
|
| @@ -62,8 +59,6 @@ TEST_F(JsSyncManagerObserverTest, NoArgNotifiations) {
|
| HandleJsEvent("onEncryptionComplete",
|
| HasDetails(JsEventDetails())));
|
|
|
| - js_sync_manager_observer_.OnInitializationComplete(WeakHandle<JsBackend>(),
|
| - true);
|
| js_sync_manager_observer_.OnStopSyncingPermanently();
|
| js_sync_manager_observer_.OnClearServerDataSucceeded();
|
| js_sync_manager_observer_.OnClearServerDataFailed();
|
| @@ -71,6 +66,22 @@ TEST_F(JsSyncManagerObserverTest, NoArgNotifiations) {
|
| PumpLoop();
|
| }
|
|
|
| +TEST_F(JsSyncManagerObserverTest, OnInitializationComplete) {
|
| + DictionaryValue expected_details;
|
| + syncable::ModelTypeSet restored_types;
|
| + restored_types.Put(syncable::BOOKMARKS);
|
| + restored_types.Put(syncable::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) {
|
| syncable::ModelTypePayloadMap download_progress_markers;
|
| sessions::SyncSessionSnapshot snapshot(sessions::SyncerStatus(),
|
|
|