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

Unified Diff: components/proximity_auth/ble/bluetooth_low_energy_connection_unittest.cc

Issue 2561203002: Migrate weave-related classes from proximity_auth/ble to cryptauth/ble. (Closed)
Patch Set: 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 side-by-side diff with in-line comments
Download patch
Index: components/proximity_auth/ble/bluetooth_low_energy_connection_unittest.cc
diff --git a/components/proximity_auth/ble/bluetooth_low_energy_connection_unittest.cc b/components/proximity_auth/ble/bluetooth_low_energy_connection_unittest.cc
index 87c814fe25287c7879e4c32ea269919e7540db8a..eec32452cd5581429a9c934657c93724c019b355 100644
--- a/components/proximity_auth/ble/bluetooth_low_energy_connection_unittest.cc
+++ b/components/proximity_auth/ble/bluetooth_low_energy_connection_unittest.cc
@@ -16,8 +16,8 @@
#include "base/message_loop/message_loop.h"
#include "base/run_loop.h"
#include "base/test/test_simple_task_runner.h"
+#include "components/cryptauth/ble/bluetooth_low_energy_characteristics_finder.h"
#include "components/cryptauth/remote_device.h"
-#include "components/proximity_auth/ble/bluetooth_low_energy_characteristics_finder.h"
#include "components/proximity_auth/bluetooth_throttler.h"
#include "components/proximity_auth/connection_finder.h"
#include "components/proximity_auth/proximity_auth_test_util.h"
@@ -75,7 +75,7 @@ class MockBluetoothThrottler : public BluetoothThrottler {
};
class MockBluetoothLowEnergyCharacteristicsFinder
- : public BluetoothLowEnergyCharacteristicsFinder {
+ : public cryptauth::BluetoothLowEnergyCharacteristicsFinder {
public:
MockBluetoothLowEnergyCharacteristicsFinder() {}
~MockBluetoothLowEnergyCharacteristicsFinder() override {}
@@ -100,12 +100,12 @@ class MockBluetoothLowEnergyConnection : public BluetoothLowEnergyConnection {
~MockBluetoothLowEnergyConnection() override {}
- MOCK_METHOD2(
- CreateCharacteristicsFinder,
- BluetoothLowEnergyCharacteristicsFinder*(
- const BluetoothLowEnergyCharacteristicsFinder::SuccessCallback&
- success,
- const BluetoothLowEnergyCharacteristicsFinder::ErrorCallback& error));
+ MOCK_METHOD2(CreateCharacteristicsFinder,
+ cryptauth::BluetoothLowEnergyCharacteristicsFinder*(
+ const cryptauth::BluetoothLowEnergyCharacteristicsFinder::
+ SuccessCallback& success,
+ const cryptauth::BluetoothLowEnergyCharacteristicsFinder::
+ ErrorCallback& error));
MOCK_METHOD2(OnDidSendMessage,
void(const WireMessage& message, bool success));
@@ -375,9 +375,9 @@ class ProximityAuthBluetoothLowEnergyConnectionTest : public testing::Test {
device::BluetoothDevice::ConnectErrorCallback
create_gatt_connection_error_callback_;
- BluetoothLowEnergyCharacteristicsFinder::SuccessCallback
+ cryptauth::BluetoothLowEnergyCharacteristicsFinder::SuccessCallback
characteristics_finder_success_callback_;
- BluetoothLowEnergyCharacteristicsFinder::ErrorCallback
+ cryptauth::BluetoothLowEnergyCharacteristicsFinder::ErrorCallback
characteristics_finder_error_callback_;
device::BluetoothRemoteGattCharacteristic::NotifySessionCallback
@@ -598,7 +598,8 @@ TEST_F(ProximityAuthBluetoothLowEnergyConnectionTest,
int message_size = 100;
std::string message(message_size, 'A');
message[0] = 'B';
- connection->SendMessage(base::MakeUnique<FakeWireMessage>(message));
+ connection->SendMessage(
+ base::MakeUnique<cryptauth::FakeWireMessage>(message));
// Expecting that |kSendSignal| + |message_size| + |message| was written.
EXPECT_EQ(last_value_written_on_to_peripheral_char_,
@@ -626,7 +627,8 @@ TEST_F(ProximityAuthBluetoothLowEnergyConnectionTest,
int message_size = 600;
std::string message(message_size, 'A');
message[0] = 'B';
- connection->SendMessage(base::MakeUnique<FakeWireMessage>(message));
+ connection->SendMessage(
+ base::MakeUnique<cryptauth::FakeWireMessage>(message));
// Expecting that |kSendSignal| + |message_size| was written in the first 8
// bytes.

Powered by Google App Engine
This is Rietveld 408576698