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/bluetooth_throttler_impl.h" | 5 #include "components/proximity_auth/bluetooth_throttler_impl.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 #include "base/macros.h" | 9 #include "base/macros.h" |
10 #include "base/memory/ptr_util.h" | 10 #include "base/memory/ptr_util.h" |
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
92 GetDelay_DelayedConnectionAfterInProgressDisconnectIsNotThrottled) { | 92 GetDelay_DelayedConnectionAfterInProgressDisconnectIsNotThrottled) { |
93 // Simulate an attempt to connect (in progress connection) followed by a | 93 // Simulate an attempt to connect (in progress connection) followed by a |
94 // disconnection, then allow the cooldown period to elapse. | 94 // disconnection, then allow the cooldown period to elapse. |
95 PerformConnectionStateTransition(Connection::IN_PROGRESS, | 95 PerformConnectionStateTransition(Connection::IN_PROGRESS, |
96 Connection::DISCONNECTED); | 96 Connection::DISCONNECTED); |
97 clock_->Advance(throttler_.GetCooldownTimeDelta()); | 97 clock_->Advance(throttler_.GetCooldownTimeDelta()); |
98 EXPECT_EQ(base::TimeDelta(), throttler_.GetDelay()); | 98 EXPECT_EQ(base::TimeDelta(), throttler_.GetDelay()); |
99 } | 99 } |
100 | 100 |
101 } // namespace proximity_auth | 101 } // namespace proximity_auth |
OLD | NEW |