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 "components/sync/engine_impl/backoff_delay_provider.h" | 5 #include "components/sync/engine_impl/backoff_delay_provider.h" |
6 | 6 |
7 #include <memory> | 7 #include <memory> |
8 | 8 |
9 #include "base/time/time.h" | |
10 #include "components/sync/base/syncer_error.h" | 9 #include "components/sync/base/syncer_error.h" |
11 #include "components/sync/engine/cycle/model_neutral_state.h" | 10 #include "components/sync/engine/cycle/model_neutral_state.h" |
12 #include "components/sync/engine/polling_constants.h" | 11 #include "components/sync/engine/polling_constants.h" |
13 #include "testing/gtest/include/gtest/gtest.h" | 12 #include "testing/gtest/include/gtest/gtest.h" |
14 | 13 |
15 using base::TimeDelta; | 14 using base::TimeDelta; |
16 | 15 |
17 namespace syncer { | 16 namespace syncer { |
18 | 17 |
19 class BackoffDelayProviderTest : public testing::Test {}; | 18 class BackoffDelayProviderTest : public testing::Test {}; |
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
121 state.commit_result = SERVER_RETURN_MIGRATION_DONE; | 120 state.commit_result = SERVER_RETURN_MIGRATION_DONE; |
122 EXPECT_EQ(kInitialBackoffImmediateRetrySeconds, | 121 EXPECT_EQ(kInitialBackoffImmediateRetrySeconds, |
123 delay->GetInitialDelay(state).InSeconds()); | 122 delay->GetInitialDelay(state).InSeconds()); |
124 | 123 |
125 state.commit_result = SERVER_RETURN_CONFLICT; | 124 state.commit_result = SERVER_RETURN_CONFLICT; |
126 EXPECT_EQ(kInitialBackoffImmediateRetrySeconds, | 125 EXPECT_EQ(kInitialBackoffImmediateRetrySeconds, |
127 delay->GetInitialDelay(state).InSeconds()); | 126 delay->GetInitialDelay(state).InSeconds()); |
128 } | 127 } |
129 | 128 |
130 } // namespace syncer | 129 } // namespace syncer |
OLD | NEW |