| Index: chromeos/components/tether/ble_connection_manager_unittest.cc
|
| diff --git a/chromeos/components/tether/ble_connection_manager_unittest.cc b/chromeos/components/tether/ble_connection_manager_unittest.cc
|
| index b18e5ef5f6602de0538ef02351761d6bd8a806be..86cb008878856aca303202853c068376c0bcbab1 100644
|
| --- a/chromeos/components/tether/ble_connection_manager_unittest.cc
|
| +++ b/chromeos/components/tether/ble_connection_manager_unittest.cc
|
| @@ -8,6 +8,7 @@
|
| #include "base/timer/mock_timer.h"
|
| #include "chromeos/components/tether/ble_constants.h"
|
| #include "chromeos/components/tether/proto/tether.pb.h"
|
| +#include "chromeos/components/tether/timer_factory.h"
|
| #include "components/cryptauth/ble/bluetooth_low_energy_weave_client_connection.h"
|
| #include "components/cryptauth/bluetooth_throttler.h"
|
| #include "components/cryptauth/connection.h"
|
| @@ -60,6 +61,14 @@ struct ReceivedMessage {
|
| std::string payload;
|
| };
|
|
|
| +class MockTimerFactory : public TimerFactory {
|
| + public:
|
| + std::unique_ptr<base::Timer> CreateOneShotTimer() override {
|
| + return base::MakeUnique<base::MockTimer>(false /* retains_user_task */,
|
| + false /* is_repeating */);
|
| + }
|
| +};
|
| +
|
| class TestObserver : public BleConnectionManager::Observer {
|
| public:
|
| TestObserver() {}
|
| @@ -229,14 +238,6 @@ class BleConnectionManagerTest : public testing::Test {
|
| std::string expected_device_address_;
|
| };
|
|
|
| - class MockTimerFactory : public BleConnectionManager::TimerFactory {
|
| - public:
|
| - std::unique_ptr<base::Timer> CreateTimer() override {
|
| - return base::MakeUnique<base::MockTimer>(false /* retains_user_task */,
|
| - false /* is_repeating */);
|
| - }
|
| - };
|
| -
|
| BleConnectionManagerTest() : test_devices_(CreateTestDevices(4)) {
|
| // These tests assume a maximum of two concurrent advertisers. Some of the
|
| // multi-device tests would need to be re-written if this constant changes.
|
|
|