| 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 "base/bind.h" | 5 #include "base/bind.h" |
| 6 #include "base/callback.h" | 6 #include "base/callback.h" |
| 7 #include "base/compiler_specific.h" | 7 #include "base/compiler_specific.h" |
| 8 #include "base/memory/weak_ptr.h" | 8 #include "base/memory/weak_ptr.h" |
| 9 #include "base/message_loop.h" | 9 #include "base/message_loop.h" |
| 10 #include "base/test/test_timeouts.h" | 10 #include "base/test/test_timeouts.h" |
| (...skipping 1038 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1049 | 1049 |
| 1050 scheduler()->ScheduleNudgeAsync( | 1050 scheduler()->ScheduleNudgeAsync( |
| 1051 zero(), NUDGE_SOURCE_LOCAL, ModelTypeSet(), FROM_HERE); | 1051 zero(), NUDGE_SOURCE_LOCAL, ModelTypeSet(), FROM_HERE); |
| 1052 PumpLoop(); | 1052 PumpLoop(); |
| 1053 // Pump again to run job. | 1053 // Pump again to run job. |
| 1054 PumpLoop(); | 1054 PumpLoop(); |
| 1055 | 1055 |
| 1056 StopSyncScheduler(); | 1056 StopSyncScheduler(); |
| 1057 Mock::VerifyAndClearExpectations(syncer()); | 1057 Mock::VerifyAndClearExpectations(syncer()); |
| 1058 | 1058 |
| 1059 // ClearUserData. | |
| 1060 EXPECT_CALL(*syncer(), SyncShare(_, CLEAR_PRIVATE_DATA, CLEAR_PRIVATE_DATA)) | |
| 1061 .WillOnce(Invoke(sessions::test_util::SimulateSuccess)); | |
| 1062 StartSyncScheduler(SyncScheduler::NORMAL_MODE); | |
| 1063 | |
| 1064 scheduler()->ClearUserData(); | |
| 1065 | |
| 1066 StopSyncScheduler(); | |
| 1067 Mock::VerifyAndClearExpectations(syncer()); | |
| 1068 | |
| 1069 // Configuration. | |
| 1070 EXPECT_CALL(*syncer(), SyncShare(_, DOWNLOAD_UPDATES, APPLY_UPDATES)) | 1059 EXPECT_CALL(*syncer(), SyncShare(_, DOWNLOAD_UPDATES, APPLY_UPDATES)) |
| 1071 .WillOnce(Invoke(sessions::test_util::SimulateSuccess)); | 1060 .WillOnce(Invoke(sessions::test_util::SimulateSuccess)); |
| 1072 StartSyncScheduler(SyncScheduler::CONFIGURATION_MODE); | 1061 StartSyncScheduler(SyncScheduler::CONFIGURATION_MODE); |
| 1073 | 1062 |
| 1074 scheduler()->ScheduleConfiguration( | 1063 scheduler()->ScheduleConfiguration( |
| 1075 ModelTypeSet(), GetUpdatesCallerInfo::RECONFIGURATION); | 1064 ModelTypeSet(), GetUpdatesCallerInfo::RECONFIGURATION); |
| 1076 | 1065 |
| 1077 StopSyncScheduler(); | 1066 StopSyncScheduler(); |
| 1078 Mock::VerifyAndClearExpectations(syncer()); | 1067 Mock::VerifyAndClearExpectations(syncer()); |
| 1079 | 1068 |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1145 PumpLoop(); | 1134 PumpLoop(); |
| 1146 // Pump again to run job. | 1135 // Pump again to run job. |
| 1147 PumpLoop(); | 1136 PumpLoop(); |
| 1148 | 1137 |
| 1149 StopSyncScheduler(); | 1138 StopSyncScheduler(); |
| 1150 | 1139 |
| 1151 EXPECT_TRUE(expected == context()->previous_session_routing_info()); | 1140 EXPECT_TRUE(expected == context()->previous_session_routing_info()); |
| 1152 } | 1141 } |
| 1153 | 1142 |
| 1154 } // namespace browser_sync | 1143 } // namespace browser_sync |
| OLD | NEW |