OLD | NEW |
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 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
65 EXPECT_CALL(mock_js_event_handler_, | 65 EXPECT_CALL(mock_js_event_handler_, |
66 HandleJsEvent("onInitializationComplete", | 66 HandleJsEvent("onInitializationComplete", |
67 HasDetailsAsDictionary(expected_details))); | 67 HasDetailsAsDictionary(expected_details))); |
68 | 68 |
69 js_sync_manager_observer_.OnInitializationComplete( | 69 js_sync_manager_observer_.OnInitializationComplete( |
70 WeakHandle<JsBackend>(), true, restored_types); | 70 WeakHandle<JsBackend>(), true, restored_types); |
71 PumpLoop(); | 71 PumpLoop(); |
72 } | 72 } |
73 | 73 |
74 TEST_F(JsSyncManagerObserverTest, OnSyncCycleCompleted) { | 74 TEST_F(JsSyncManagerObserverTest, OnSyncCycleCompleted) { |
75 ModelTypeStateMap download_progress_markers; | 75 ModelTypeInvalidationMap download_progress_markers; |
76 sessions::SyncSessionSnapshot snapshot(sessions::ModelNeutralState(), | 76 sessions::SyncSessionSnapshot snapshot(sessions::ModelNeutralState(), |
77 false, | 77 false, |
78 ModelTypeSet(), | 78 ModelTypeSet(), |
79 download_progress_markers, | 79 download_progress_markers, |
80 false, | 80 false, |
81 true, | 81 true, |
82 8, | 82 8, |
83 5, | 83 5, |
84 2, | 84 2, |
85 7, | 85 7, |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
138 EXPECT_CALL(mock_js_event_handler_, | 138 EXPECT_CALL(mock_js_event_handler_, |
139 HandleJsEvent("onUpdatedToken", | 139 HandleJsEvent("onUpdatedToken", |
140 HasDetailsAsDictionary(redacted_token_details))); | 140 HasDetailsAsDictionary(redacted_token_details))); |
141 | 141 |
142 js_sync_manager_observer_.OnUpdatedToken("sensitive_token"); | 142 js_sync_manager_observer_.OnUpdatedToken("sensitive_token"); |
143 PumpLoop(); | 143 PumpLoop(); |
144 } | 144 } |
145 | 145 |
146 } // namespace | 146 } // namespace |
147 } // namespace syncer | 147 } // namespace syncer |
OLD | NEW |