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 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
78 ProgressMarkerMap(), | 78 ProgressMarkerMap(), |
79 false, | 79 false, |
80 true, | 80 true, |
81 8, | 81 8, |
82 5, | 82 5, |
83 2, | 83 2, |
84 7, | 84 7, |
85 sessions::SyncSourceInfo(), | 85 sessions::SyncSourceInfo(), |
86 false, | 86 false, |
87 0, | 87 0, |
88 base::Time::Now(), | 88 base::Time::Now()); |
89 false); | |
90 DictionaryValue expected_details; | 89 DictionaryValue expected_details; |
91 expected_details.Set("snapshot", snapshot.ToValue()); | 90 expected_details.Set("snapshot", snapshot.ToValue()); |
92 | 91 |
93 EXPECT_CALL(mock_js_event_handler_, | 92 EXPECT_CALL(mock_js_event_handler_, |
94 HandleJsEvent("onSyncCycleCompleted", | 93 HandleJsEvent("onSyncCycleCompleted", |
95 HasDetailsAsDictionary(expected_details))); | 94 HasDetailsAsDictionary(expected_details))); |
96 | 95 |
97 js_sync_manager_observer_.OnSyncCycleCompleted(snapshot); | 96 js_sync_manager_observer_.OnSyncCycleCompleted(snapshot); |
98 PumpLoop(); | 97 PumpLoop(); |
99 } | 98 } |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
137 EXPECT_CALL(mock_js_event_handler_, | 136 EXPECT_CALL(mock_js_event_handler_, |
138 HandleJsEvent("onUpdatedToken", | 137 HandleJsEvent("onUpdatedToken", |
139 HasDetailsAsDictionary(redacted_token_details))); | 138 HasDetailsAsDictionary(redacted_token_details))); |
140 | 139 |
141 js_sync_manager_observer_.OnUpdatedToken("sensitive_token"); | 140 js_sync_manager_observer_.OnUpdatedToken("sensitive_token"); |
142 PumpLoop(); | 141 PumpLoop(); |
143 } | 142 } |
144 | 143 |
145 } // namespace | 144 } // namespace |
146 } // namespace syncer | 145 } // namespace syncer |
OLD | NEW |