| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/scoped_callback_factory.h" | 8 #include "base/memory/scoped_callback_factory.h" |
| 9 #include "base/message_loop.h" | 9 #include "base/message_loop.h" |
| 10 #include "base/task.h" | 10 #include "base/task.h" |
| (...skipping 991 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1002 scheduler()->Stop(); | 1002 scheduler()->Stop(); |
| 1003 Mock::VerifyAndClearExpectations(syncer()); | 1003 Mock::VerifyAndClearExpectations(syncer()); |
| 1004 | 1004 |
| 1005 // Cleanup disabled types. | 1005 // Cleanup disabled types. |
| 1006 EXPECT_CALL(*syncer(), | 1006 EXPECT_CALL(*syncer(), |
| 1007 SyncShare(_, CLEANUP_DISABLED_TYPES, CLEANUP_DISABLED_TYPES)); | 1007 SyncShare(_, CLEANUP_DISABLED_TYPES, CLEANUP_DISABLED_TYPES)); |
| 1008 StartSyncScheduler(SyncScheduler::NORMAL_MODE); | 1008 StartSyncScheduler(SyncScheduler::NORMAL_MODE); |
| 1009 RunLoop(); | 1009 RunLoop(); |
| 1010 | 1010 |
| 1011 scheduler()->ScheduleCleanupDisabledTypes(); | 1011 scheduler()->ScheduleCleanupDisabledTypes(); |
| 1012 PumpLoop(); | 1012 // Only need to pump once, as ScheduleCleanupDisabledTypes() |
| 1013 // schedules the job directly. |
| 1013 PumpLoop(); | 1014 PumpLoop(); |
| 1014 | 1015 |
| 1015 scheduler()->Stop(); | 1016 scheduler()->Stop(); |
| 1016 Mock::VerifyAndClearExpectations(syncer()); | 1017 Mock::VerifyAndClearExpectations(syncer()); |
| 1017 | 1018 |
| 1018 // Poll. | 1019 // Poll. |
| 1019 EXPECT_CALL(*syncer(), SyncShare(_, SYNCER_BEGIN, SYNCER_END)) | 1020 EXPECT_CALL(*syncer(), SyncShare(_, SYNCER_BEGIN, SYNCER_END)) |
| 1020 .Times(AtLeast(1)) | 1021 .Times(AtLeast(1)) |
| 1021 .WillRepeatedly(QuitLoopNowAction()); | 1022 .WillRepeatedly(QuitLoopNowAction()); |
| 1022 const TimeDelta poll(TimeDelta::FromMilliseconds(10)); | 1023 const TimeDelta poll(TimeDelta::FromMilliseconds(10)); |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1070 PumpLoop(); | 1071 PumpLoop(); |
| 1071 // Pump again to run job. | 1072 // Pump again to run job. |
| 1072 PumpLoop(); | 1073 PumpLoop(); |
| 1073 | 1074 |
| 1074 scheduler()->Stop(); | 1075 scheduler()->Stop(); |
| 1075 | 1076 |
| 1076 EXPECT_TRUE(expected == context()->previous_session_routing_info()); | 1077 EXPECT_TRUE(expected == context()->previous_session_routing_info()); |
| 1077 } | 1078 } |
| 1078 | 1079 |
| 1079 } // namespace browser_sync | 1080 } // namespace browser_sync |
| OLD | NEW |