| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 "components/proximity_auth/cryptauth/sync_scheduler_impl.h" | 5 #include "components/proximity_auth/cryptauth/sync_scheduler_impl.h" |
| 6 | 6 |
| 7 #include "base/macros.h" |
| 7 #include "base/timer/mock_timer.h" | 8 #include "base/timer/mock_timer.h" |
| 8 #include "testing/gtest/include/gtest/gtest.h" | 9 #include "testing/gtest/include/gtest/gtest.h" |
| 9 | 10 |
| 10 namespace proximity_auth { | 11 namespace proximity_auth { |
| 11 | 12 |
| 12 using Strategy = SyncScheduler::Strategy; | 13 using Strategy = SyncScheduler::Strategy; |
| 13 using SyncState = SyncScheduler::SyncState; | 14 using SyncState = SyncScheduler::SyncState; |
| 14 | 15 |
| 15 namespace { | 16 namespace { |
| 16 | 17 |
| (...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 279 // This could happen in rare cases where the system clock changes. | 280 // This could happen in rare cases where the system clock changes. |
| 280 scheduler_->Start(base::TimeDelta::FromDays(-1000), | 281 scheduler_->Start(base::TimeDelta::FromDays(-1000), |
| 281 Strategy::PERIODIC_REFRESH); | 282 Strategy::PERIODIC_REFRESH); |
| 282 | 283 |
| 283 base::TimeDelta zero_delta = base::TimeDelta::FromSeconds(0); | 284 base::TimeDelta zero_delta = base::TimeDelta::FromSeconds(0); |
| 284 EXPECT_EQ(zero_delta, scheduler_->GetTimeToNextSync()); | 285 EXPECT_EQ(zero_delta, scheduler_->GetTimeToNextSync()); |
| 285 EXPECT_EQ(zero_delta, timer()->GetCurrentDelay()); | 286 EXPECT_EQ(zero_delta, timer()->GetCurrentDelay()); |
| 286 } | 287 } |
| 287 | 288 |
| 288 } // namespace proximity_auth | 289 } // namespace proximity_auth |
| OLD | NEW |