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 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
70 WeakHandle<JsBackend>(), | 70 WeakHandle<JsBackend>(), |
71 WeakHandle<DataTypeDebugInfoListener>(), | 71 WeakHandle<DataTypeDebugInfoListener>(), |
72 true, | 72 true, |
73 restored_types); | 73 restored_types); |
74 PumpLoop(); | 74 PumpLoop(); |
75 } | 75 } |
76 | 76 |
77 TEST_F(JsSyncManagerObserverTest, OnSyncCycleCompleted) { | 77 TEST_F(JsSyncManagerObserverTest, OnSyncCycleCompleted) { |
78 sessions::SyncSessionSnapshot snapshot( | 78 sessions::SyncSessionSnapshot snapshot( |
79 sessions::ModelNeutralState(), | 79 sessions::ModelNeutralState(), |
80 false, | |
81 ModelTypeSet(), | |
82 ProgressMarkerMap(), | 80 ProgressMarkerMap(), |
83 false, | 81 false, |
84 5, | 82 5, |
85 2, | 83 2, |
86 7, | 84 7, |
87 sessions::SyncSourceInfo(), | 85 sessions::SyncSourceInfo(), |
88 std::vector<sessions::SyncSourceInfo>(), | 86 std::vector<sessions::SyncSourceInfo>(), |
89 false, | 87 false, |
90 0, | 88 0, |
91 base::Time::Now(), | 89 base::Time::Now(), |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
141 EXPECT_CALL(mock_js_event_handler_, | 139 EXPECT_CALL(mock_js_event_handler_, |
142 HandleJsEvent("onUpdatedToken", | 140 HandleJsEvent("onUpdatedToken", |
143 HasDetailsAsDictionary(redacted_token_details))); | 141 HasDetailsAsDictionary(redacted_token_details))); |
144 | 142 |
145 js_sync_manager_observer_.OnUpdatedToken("sensitive_token"); | 143 js_sync_manager_observer_.OnUpdatedToken("sensitive_token"); |
146 PumpLoop(); | 144 PumpLoop(); |
147 } | 145 } |
148 | 146 |
149 } // namespace | 147 } // namespace |
150 } // namespace syncer | 148 } // namespace syncer |
OLD | NEW |