| 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 "chrome/browser/sync/js/js_sync_manager_observer.h" | 5 #include "chrome/browser/sync/js/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 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 80 syncable::ModelTypeSet(), | 80 syncable::ModelTypeSet(), |
| 81 download_progress_markers, | 81 download_progress_markers, |
| 82 false, | 82 false, |
| 83 true, | 83 true, |
| 84 100, | 84 100, |
| 85 8, | 85 8, |
| 86 5, | 86 5, |
| 87 false, | 87 false, |
| 88 sessions::SyncSourceInfo(), | 88 sessions::SyncSourceInfo(), |
| 89 0, | 89 0, |
| 90 base::Time::Now()); | 90 base::Time::Now(), |
| 91 false); |
| 91 DictionaryValue expected_details; | 92 DictionaryValue expected_details; |
| 92 expected_details.Set("snapshot", snapshot.ToValue()); | 93 expected_details.Set("snapshot", snapshot.ToValue()); |
| 93 | 94 |
| 94 EXPECT_CALL(mock_js_event_handler_, | 95 EXPECT_CALL(mock_js_event_handler_, |
| 95 HandleJsEvent("onSyncCycleCompleted", | 96 HandleJsEvent("onSyncCycleCompleted", |
| 96 HasDetailsAsDictionary(expected_details))); | 97 HasDetailsAsDictionary(expected_details))); |
| 97 | 98 |
| 98 js_sync_manager_observer_.OnSyncCycleCompleted(&snapshot); | 99 js_sync_manager_observer_.OnSyncCycleCompleted(&snapshot); |
| 99 PumpLoop(); | 100 PumpLoop(); |
| 100 } | 101 } |
| (...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 218 HandleJsEvent("onEncryptedTypesChanged", | 219 HandleJsEvent("onEncryptedTypesChanged", |
| 219 HasDetailsAsDictionary(expected_details))); | 220 HasDetailsAsDictionary(expected_details))); |
| 220 | 221 |
| 221 js_sync_manager_observer_.OnEncryptedTypesChanged( | 222 js_sync_manager_observer_.OnEncryptedTypesChanged( |
| 222 encrypted_types, encrypt_everything); | 223 encrypted_types, encrypt_everything); |
| 223 PumpLoop(); | 224 PumpLoop(); |
| 224 } | 225 } |
| 225 | 226 |
| 226 } // namespace | 227 } // namespace |
| 227 } // namespace browser_sync | 228 } // namespace browser_sync |
| OLD | NEW |