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/message_loop.h" | 9 #include "base/message_loop/message_loop.h" |
10 #include "base/test/test_timeouts.h" | 10 #include "base/test/test_timeouts.h" |
(...skipping 1318 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1329 .WillOnce( | 1329 .WillOnce( |
1330 DoAll(Invoke(sessions::test_util::SimulateNormalSuccess), | 1330 DoAll(Invoke(sessions::test_util::SimulateNormalSuccess), |
1331 RecordSyncShare(×))); | 1331 RecordSyncShare(×))); |
1332 | 1332 |
1333 // Run to wait for retrying. | 1333 // Run to wait for retrying. |
1334 RunLoop(); | 1334 RunLoop(); |
1335 | 1335 |
1336 StopSyncScheduler(); | 1336 StopSyncScheduler(); |
1337 } | 1337 } |
1338 | 1338 |
1339 TEST_F(SyncSchedulerTest, FailedRetry) { | 1339 #if defined(OS_WIN) |
| 1340 // Times out: http://crbug.com/402212 |
| 1341 #define MAYBE_FailedRetry DISABLED_FailedRetry |
| 1342 #else |
| 1343 #define MAYBE_FailedRetry FailedRetry |
| 1344 #endif |
| 1345 TEST_F(SyncSchedulerTest, MAYBE_FailedRetry) { |
1340 UseMockDelayProvider(); | 1346 UseMockDelayProvider(); |
1341 EXPECT_CALL(*delay(), GetDelay(_)) | 1347 EXPECT_CALL(*delay(), GetDelay(_)) |
1342 .WillRepeatedly(Return(TimeDelta::FromMilliseconds(1))); | 1348 .WillRepeatedly(Return(TimeDelta::FromMilliseconds(1))); |
1343 | 1349 |
1344 StartSyncScheduler(SyncScheduler::NORMAL_MODE); | 1350 StartSyncScheduler(SyncScheduler::NORMAL_MODE); |
1345 | 1351 |
1346 base::TimeDelta delay = base::TimeDelta::FromMilliseconds(1); | 1352 base::TimeDelta delay = base::TimeDelta::FromMilliseconds(1); |
1347 scheduler()->OnReceivedGuRetryDelay(delay); | 1353 scheduler()->OnReceivedGuRetryDelay(delay); |
1348 | 1354 |
1349 EXPECT_CALL(*syncer(), NormalSyncShare(_,_,_)) | 1355 EXPECT_CALL(*syncer(), NormalSyncShare(_,_,_)) |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1396 .WillOnce(DoAll(Invoke(sessions::test_util::SimulateNormalSuccess), | 1402 .WillOnce(DoAll(Invoke(sessions::test_util::SimulateNormalSuccess), |
1397 RecordSyncShare(×))); | 1403 RecordSyncShare(×))); |
1398 | 1404 |
1399 // Run to wait for retrying. | 1405 // Run to wait for retrying. |
1400 RunLoop(); | 1406 RunLoop(); |
1401 | 1407 |
1402 StopSyncScheduler(); | 1408 StopSyncScheduler(); |
1403 } | 1409 } |
1404 | 1410 |
1405 } // namespace syncer | 1411 } // namespace syncer |
OLD | NEW |