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