| 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/run_loop.h" | 9 #include "base/run_loop.h" |
| 10 #include "base/values.h" | 10 #include "base/values.h" |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 67 sessions::SyncSessionSnapshot snapshot( | 67 sessions::SyncSessionSnapshot snapshot( |
| 68 sessions::ModelNeutralState(), | 68 sessions::ModelNeutralState(), |
| 69 ProgressMarkerMap(), | 69 ProgressMarkerMap(), |
| 70 false, | 70 false, |
| 71 5, | 71 5, |
| 72 2, | 72 2, |
| 73 7, | 73 7, |
| 74 false, | 74 false, |
| 75 0, | 75 0, |
| 76 base::Time::Now(), | 76 base::Time::Now(), |
| 77 base::Time::Now(), | |
| 78 std::vector<int>(MODEL_TYPE_COUNT, 0), | 77 std::vector<int>(MODEL_TYPE_COUNT, 0), |
| 79 std::vector<int>(MODEL_TYPE_COUNT, 0), | 78 std::vector<int>(MODEL_TYPE_COUNT, 0), |
| 80 sync_pb::GetUpdatesCallerInfo::UNKNOWN); | 79 sync_pb::GetUpdatesCallerInfo::UNKNOWN); |
| 81 base::DictionaryValue expected_details; | 80 base::DictionaryValue expected_details; |
| 82 expected_details.Set("snapshot", snapshot.ToValue()); | 81 expected_details.Set("snapshot", snapshot.ToValue()); |
| 83 | 82 |
| 84 EXPECT_CALL(mock_js_event_handler_, | 83 EXPECT_CALL(mock_js_event_handler_, |
| 85 HandleJsEvent("onSyncCycleCompleted", | 84 HandleJsEvent("onSyncCycleCompleted", |
| 86 HasDetailsAsDictionary(expected_details))); | 85 HasDetailsAsDictionary(expected_details))); |
| 87 | 86 |
| (...skipping 26 matching lines...) Expand all Loading... |
| 114 EXPECT_CALL(mock_js_event_handler_, | 113 EXPECT_CALL(mock_js_event_handler_, |
| 115 HandleJsEvent("onConnectionStatusChange", | 114 HandleJsEvent("onConnectionStatusChange", |
| 116 HasDetailsAsDictionary(expected_details))); | 115 HasDetailsAsDictionary(expected_details))); |
| 117 | 116 |
| 118 js_sync_manager_observer_.OnConnectionStatusChange(kStatus); | 117 js_sync_manager_observer_.OnConnectionStatusChange(kStatus); |
| 119 PumpLoop(); | 118 PumpLoop(); |
| 120 } | 119 } |
| 121 | 120 |
| 122 } // namespace | 121 } // namespace |
| 123 } // namespace syncer | 122 } // namespace syncer |
| OLD | NEW |