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(), |
77 std::vector<int>(MODEL_TYPE_COUNT, 0), | 78 std::vector<int>(MODEL_TYPE_COUNT, 0), |
78 std::vector<int>(MODEL_TYPE_COUNT, 0), | 79 std::vector<int>(MODEL_TYPE_COUNT, 0), |
79 sync_pb::GetUpdatesCallerInfo::UNKNOWN); | 80 sync_pb::GetUpdatesCallerInfo::UNKNOWN); |
80 base::DictionaryValue expected_details; | 81 base::DictionaryValue expected_details; |
81 expected_details.Set("snapshot", snapshot.ToValue()); | 82 expected_details.Set("snapshot", snapshot.ToValue()); |
82 | 83 |
83 EXPECT_CALL(mock_js_event_handler_, | 84 EXPECT_CALL(mock_js_event_handler_, |
84 HandleJsEvent("onSyncCycleCompleted", | 85 HandleJsEvent("onSyncCycleCompleted", |
85 HasDetailsAsDictionary(expected_details))); | 86 HasDetailsAsDictionary(expected_details))); |
86 | 87 |
(...skipping 26 matching lines...) Expand all Loading... |
113 EXPECT_CALL(mock_js_event_handler_, | 114 EXPECT_CALL(mock_js_event_handler_, |
114 HandleJsEvent("onConnectionStatusChange", | 115 HandleJsEvent("onConnectionStatusChange", |
115 HasDetailsAsDictionary(expected_details))); | 116 HasDetailsAsDictionary(expected_details))); |
116 | 117 |
117 js_sync_manager_observer_.OnConnectionStatusChange(kStatus); | 118 js_sync_manager_observer_.OnConnectionStatusChange(kStatus); |
118 PumpLoop(); | 119 PumpLoop(); |
119 } | 120 } |
120 | 121 |
121 } // namespace | 122 } // namespace |
122 } // namespace syncer | 123 } // namespace syncer |
OLD | NEW |