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

Unified Diff: components/proximity_auth/throttled_bluetooth_connection_finder_unittest.cc

Issue 1351473003: Refactor fake Connection subclasses in proximity_auth/ tests to a single file. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@client_rename
Patch Set: rebase Created 5 years, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « components/proximity_auth/remote_device_life_cycle_impl_unittest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/proximity_auth/throttled_bluetooth_connection_finder_unittest.cc
diff --git a/components/proximity_auth/throttled_bluetooth_connection_finder_unittest.cc b/components/proximity_auth/throttled_bluetooth_connection_finder_unittest.cc
index cf2ca7bc05ce7e55eebe43333f7b829bfa232a28..88cebd50784567520d8e8182f5d9702b7f0ea19a 100644
--- a/components/proximity_auth/throttled_bluetooth_connection_finder_unittest.cc
+++ b/components/proximity_auth/throttled_bluetooth_connection_finder_unittest.cc
@@ -9,7 +9,7 @@
#include "base/time/time.h"
#include "components/proximity_auth/bluetooth_connection_finder.h"
#include "components/proximity_auth/bluetooth_throttler.h"
-#include "components/proximity_auth/connection.h"
+#include "components/proximity_auth/fake_connection.h"
#include "components/proximity_auth/remote_device.h"
#include "components/proximity_auth/wire_message.h"
#include "device/bluetooth/bluetooth_uuid.h"
@@ -32,19 +32,6 @@ void SaveConnection(scoped_ptr<Connection>* out,
*out = connection.Pass();
}
-class StubConnection : public Connection {
- public:
- StubConnection() : Connection(RemoteDevice()) {}
- ~StubConnection() override {}
-
- void Connect() override {}
- void Disconnect() override {}
- void SendMessageImpl(scoped_ptr<WireMessage> message) override {}
-
- private:
- DISALLOW_COPY_AND_ASSIGN(StubConnection);
-};
-
class MockBluetoothThrottler : public BluetoothThrottler {
public:
MockBluetoothThrottler() {}
@@ -67,7 +54,8 @@ class FakeBluetoothConnectionFinder : public BluetoothConnectionFinder {
~FakeBluetoothConnectionFinder() override {}
void Find(const ConnectionCallback& connection_callback) override {
- connection_callback.Run(make_scoped_ptr(new StubConnection));
+ connection_callback.Run(
+ make_scoped_ptr(new FakeConnection(RemoteDevice())));
}
private:
« no previous file with comments | « components/proximity_auth/remote_device_life_cycle_impl_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698