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

Unified Diff: device/bluetooth/test/bluetooth_test.h

Issue 1246913006: Bringing 4 more BluetoothTest.* unit tests to Mac (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@scheibtest
Patch Set: Created 5 years, 5 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
Index: device/bluetooth/test/bluetooth_test.h
diff --git a/device/bluetooth/test/bluetooth_test.h b/device/bluetooth/test/bluetooth_test.h
index a45373b0cfa759d8c71a73af09ae9b64c2228d9b..0892fff089c3bac7315e97aa27b4a518d846f383 100644
--- a/device/bluetooth/test/bluetooth_test.h
+++ b/device/bluetooth/test/bluetooth_test.h
@@ -25,6 +25,14 @@ class BluetoothTestBase : public testing::Test {
static const std::string kTestAdapterName;
static const std::string kTestAdapterAddress;
+ static const std::string kTestDeviceName;
+ static const std::string kTestDeviceNameEmpty;
+
+ static const std::string kTestUUID1;
+ static const std::string kTestUUID2;
+ static const std::string kTestUUID3;
+ static const std::string kTestUUID4;
+
BluetoothTestBase();
~BluetoothTestBase() override;
@@ -41,13 +49,20 @@ class BluetoothTestBase : public testing::Test {
virtual void InitWithFakeAdapter(){};
// Create a fake Low Energy device and discover it.
- // |device_ordinal| selects between multiple fake device data sets to produce.
- // 1: AA:00:00:00:00:01 with simple default values.
- // 2: AA:00:00:00:00:01 with different advertised Service UUIDs vs 1.
- // 3: AA:00:00:00:00:01 with empty name, empty UUIDs.
- // 4: BB:00:00:00:00:02 with empty name, empty UUIDs.
+ // |device_ordinal| selects between multiple fake device data sets to produce:
+ // 1: kTestDeviceName with advertised UUIDs kTestUUID1, kTestUUID2
+ // Address AA:00:00:00:00:01 on Android. 01:00:00:90:1E:BE on Mac.
scheib 2015/07/23 18:15:25 Please change the address on Android as well so th
krstnmnlsn 2015/07/23 22:03:29 Done.
+ // 2: kTestDeviceName with advertised UUIDs kTestUUID3, kTestUUID4
+ // Address AA:00:00:00:00:01 on Android. 01:00:00:90:1E:BE on Mac.
+ // 3: kTestDeviceNameEmpty with no advertised UUIDs.
+ // Address AA:00:00:00:00:01 on Android. 01:00:00:90:1E:BE on Mac.
+ // 4: kTestDeviceNameEmpty with no advertised UUIDs.
+ // Address BB:00:00:00:00:02 on Android. 02:00:00:8B:74:63 on Mac.
virtual void DiscoverLowEnergyDevice(int device_ordinal){};
+ // Check if Low Energy is available. On Mac, we require OS X >= 10.10.
scheib 2015/07/23 18:15:25 Logically this is used very early, so it fits bett
krstnmnlsn 2015/07/23 22:03:29 Done.
+ virtual bool PlatformSupportsLowEnergy() = 0;
+
// Callbacks that increment |callback_count_|, |error_callback_count_|:
void Callback();
void DiscoverySessionCallback(scoped_ptr<BluetoothDiscoverySession>);

Powered by Google App Engine
This is Rietveld 408576698