Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(35)

Side by Side Diff: components/proximity_auth/bluetooth_throttler_impl_unittest.cc

Issue 1551433002: Switch to standard integer types in components/, part 3 of 4. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: more Created 4 years, 12 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 "base/macros.h"
7 #include "base/test/simple_test_tick_clock.h" 8 #include "base/test/simple_test_tick_clock.h"
8 #include "base/time/time.h" 9 #include "base/time/time.h"
9 #include "components/proximity_auth/fake_connection.h" 10 #include "components/proximity_auth/fake_connection.h"
10 #include "components/proximity_auth/wire_message.h" 11 #include "components/proximity_auth/wire_message.h"
11 #include "testing/gtest/include/gtest/gtest.h" 12 #include "testing/gtest/include/gtest/gtest.h"
12 13
13 namespace proximity_auth { 14 namespace proximity_auth {
14 namespace { 15 namespace {
15 16
16 class TestBluetoothThrottler : public BluetoothThrottlerImpl { 17 class TestBluetoothThrottler : public BluetoothThrottlerImpl {
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 GetDelay_DelayedConnectionAfterInProgressDisconnectIsNotThrottled) { 89 GetDelay_DelayedConnectionAfterInProgressDisconnectIsNotThrottled) {
89 // Simulate an attempt to connect (in progress connection) followed by a 90 // Simulate an attempt to connect (in progress connection) followed by a
90 // disconnection, then allow the cooldown period to elapse. 91 // disconnection, then allow the cooldown period to elapse.
91 PerformConnectionStateTransition(Connection::IN_PROGRESS, 92 PerformConnectionStateTransition(Connection::IN_PROGRESS,
92 Connection::DISCONNECTED); 93 Connection::DISCONNECTED);
93 clock_->Advance(throttler_.GetCooldownTimeDelta()); 94 clock_->Advance(throttler_.GetCooldownTimeDelta());
94 EXPECT_EQ(base::TimeDelta(), throttler_.GetDelay()); 95 EXPECT_EQ(base::TimeDelta(), throttler_.GetDelay());
95 } 96 }
96 97
97 } // namespace proximity_auth 98 } // namespace proximity_auth
OLDNEW
« no previous file with comments | « components/proximity_auth/bluetooth_connection_unittest.cc ('k') | components/proximity_auth/bluetooth_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698