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

Side by Side Diff: components/proximity_auth/ble/bluetooth_low_energy_weave_client_connection_unittest.cc

Issue 2574853002: De-flake BluetoothLowEnergyWeave* tests. (Closed)
Patch Set: Removed TODO comments. Created 4 years 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
« no previous file with comments | « no previous file | components/proximity_auth/ble/bluetooth_low_energy_weave_packet_generator_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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/ble/bluetooth_low_energy_weave_client_connec tion.h" 5 #include "components/proximity_auth/ble/bluetooth_low_energy_weave_client_connec tion.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 8
9 #include <memory> 9 #include <memory>
10 #include <utility> 10 #include <utility>
(...skipping 343 matching lines...) Expand 10 before | Expand all | Expand 10 after
354 generator_factory_( 354 generator_factory_(
355 new MockBluetoothLowEnergyWeavePacketGeneratorFactory()), 355 new MockBluetoothLowEnergyWeavePacketGeneratorFactory()),
356 receiver_factory_( 356 receiver_factory_(
357 new MockBluetoothLowEnergyWeavePacketReceiverFactory()) { 357 new MockBluetoothLowEnergyWeavePacketReceiverFactory()) {
358 BluetoothLowEnergyWeavePacketGenerator::Factory::SetInstanceForTesting( 358 BluetoothLowEnergyWeavePacketGenerator::Factory::SetInstanceForTesting(
359 generator_factory_); 359 generator_factory_);
360 BluetoothLowEnergyWeavePacketReceiver::Factory::SetInstanceForTesting( 360 BluetoothLowEnergyWeavePacketReceiver::Factory::SetInstanceForTesting(
361 receiver_factory_); 361 receiver_factory_);
362 } 362 }
363 363
364 ~ProximityAuthBluetoothLowEnergyWeaveClientConnectionTest() override {
365 BluetoothLowEnergyWeavePacketGenerator::Factory::SetInstanceForTesting(
366 nullptr);
367 BluetoothLowEnergyWeavePacketReceiver::Factory::SetInstanceForTesting(
368 nullptr);
369 }
370
364 void SetUp() override { 371 void SetUp() override {
365 device_ = base::MakeUnique<NiceMock<device::MockBluetoothDevice>>( 372 device_ = base::MakeUnique<NiceMock<device::MockBluetoothDevice>>(
366 adapter_.get(), 0, kTestRemoteDeviceName, 373 adapter_.get(), 0, kTestRemoteDeviceName,
367 kTestRemoteDeviceBluetoothAddress, false, false); 374 kTestRemoteDeviceBluetoothAddress, false, false);
368 375
369 service_ = base::MakeUnique<NiceMock<device::MockBluetoothGattService>>( 376 service_ = base::MakeUnique<NiceMock<device::MockBluetoothGattService>>(
370 device_.get(), kServiceID, service_uuid_, true, false); 377 device_.get(), kServiceID, service_uuid_, true, false);
371 tx_characteristic_ = 378 tx_characteristic_ =
372 base::MakeUnique<NiceMock<device::MockBluetoothGattCharacteristic>>( 379 base::MakeUnique<NiceMock<device::MockBluetoothGattCharacteristic>>(
373 service_.get(), kTXCharacteristicID, tx_characteristic_uuid_, false, 380 service_.get(), kTXCharacteristicID, tx_characteristic_uuid_, false,
(...skipping 666 matching lines...) Expand 10 before | Expand all | Expand 10 after
1040 adapter_, kTestRemoteDeviceBluetoothAddress)); 1047 adapter_, kTestRemoteDeviceBluetoothAddress));
1041 1048
1042 CharacteristicsFound(connection.get()); 1049 CharacteristicsFound(connection.get());
1043 NotifySessionStarted(connection.get()); 1050 NotifySessionStarted(connection.get());
1044 ConnectionResponseReceived(connection.get(), kDefaultMaxPacketSize); 1051 ConnectionResponseReceived(connection.get(), kDefaultMaxPacketSize);
1045 } 1052 }
1046 1053
1047 } // namespace weave 1054 } // namespace weave
1048 1055
1049 } // namespace proximity_auth 1056 } // namespace proximity_auth
OLDNEW
« no previous file with comments | « no previous file | components/proximity_auth/ble/bluetooth_low_energy_weave_packet_generator_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698