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

Unified Diff: device/bluetooth/test/bluetooth_test_mac.mm

Issue 2924753002: Allow device/bluetooth to build on the macOS 10.13 SDK (Closed)
Patch Set: Use new enum values in tests too Created 3 years, 6 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_mac.mm
diff --git a/device/bluetooth/test/bluetooth_test_mac.mm b/device/bluetooth/test/bluetooth_test_mac.mm
index 5f16078f45873c5519900e13709adfa6084943ea..eac0c6a3e28e7f4dc17b4040692ba8ba9df45cc5 100644
--- a/device/bluetooth/test/bluetooth_test_mac.mm
+++ b/device/bluetooth/test/bluetooth_test_mac.mm
@@ -2,28 +2,27 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "device/bluetooth/test/bluetooth_test_mac.h"
+#import "device/bluetooth/test/bluetooth_test_mac.h"
+#import <CoreBluetooth/CoreBluetooth.h>
#include <stdint.h>
-#include "base/mac/foundation_util.h"
+#import "base/mac/foundation_util.h"
#include "base/strings/string_number_conversions.h"
#include "base/strings/sys_string_conversions.h"
#include "build/build_config.h"
-#include "device/bluetooth/bluetooth_adapter_mac.h"
-#include "device/bluetooth/bluetooth_device_mac.h"
-#include "device/bluetooth/bluetooth_remote_gatt_characteristic_mac.h"
-#include "device/bluetooth/bluetooth_remote_gatt_descriptor_mac.h"
-#include "device/bluetooth/bluetooth_remote_gatt_service_mac.h"
-#include "device/bluetooth/test/mock_bluetooth_cbcharacteristic_mac.h"
-#include "device/bluetooth/test/mock_bluetooth_cbdescriptor_mac.h"
-#include "device/bluetooth/test/mock_bluetooth_cbperipheral_mac.h"
-#include "device/bluetooth/test/mock_bluetooth_cbservice_mac.h"
-#include "device/bluetooth/test/mock_bluetooth_central_manager_mac.h"
-#include "device/bluetooth/test/test_bluetooth_adapter_observer.h"
-#include "third_party/ocmock/OCMock/OCMock.h"
-
-#import <CoreBluetooth/CoreBluetooth.h>
+#import "device/bluetooth/bluetooth_adapter_mac.h"
+#import "device/bluetooth/bluetooth_device_mac.h"
+#import "device/bluetooth/bluetooth_remote_gatt_characteristic_mac.h"
+#import "device/bluetooth/bluetooth_remote_gatt_descriptor_mac.h"
+#import "device/bluetooth/bluetooth_remote_gatt_service_mac.h"
+#import "device/bluetooth/test/mock_bluetooth_cbcharacteristic_mac.h"
+#import "device/bluetooth/test/mock_bluetooth_cbdescriptor_mac.h"
+#import "device/bluetooth/test/mock_bluetooth_cbperipheral_mac.h"
+#import "device/bluetooth/test/mock_bluetooth_cbservice_mac.h"
+#import "device/bluetooth/test/mock_bluetooth_central_manager_mac.h"
+#import "device/bluetooth/test/test_bluetooth_adapter_observer.h"
+#import "third_party/ocmock/OCMock/OCMock.h"
using base::mac::ObjCCast;
using base::scoped_nsobject;
@@ -114,7 +113,7 @@ void BluetoothTestMac::InitWithoutDefaultAdapter() {
mock_central_manager_.reset(
new ScopedMockCentralManager([[MockCentralManager alloc] init]));
[mock_central_manager_->get() setBluetoothTestMac:this];
- [mock_central_manager_->get() setState:CBCentralManagerStateUnsupported];
+ [mock_central_manager_->get() setState:CBManagerStateUnsupported];
adapter_mac_->SetCentralManagerForTesting((id)mock_central_manager_->get());
}
}
@@ -130,7 +129,7 @@ void BluetoothTestMac::InitWithFakeAdapter() {
mock_central_manager_.reset(
new ScopedMockCentralManager([[MockCentralManager alloc] init]));
mock_central_manager_->get().bluetoothTestMac = this;
- [mock_central_manager_->get() setState:CBCentralManagerStatePoweredOn];
+ [mock_central_manager_->get() setState:CBManagerStatePoweredOn];
adapter_mac_->SetCentralManagerForTesting((id)mock_central_manager_->get());
}
}
@@ -141,7 +140,7 @@ void BluetoothTestMac::ResetEventCounts() {
}
void BluetoothTestMac::SimulateAdapterPoweredOff() {
- [mock_central_manager_->get() setState:CBCentralManagerStatePoweredOff];
+ [mock_central_manager_->get() setState:CBManagerStatePoweredOff];
for (BluetoothDevice* device : adapter_->GetDevices()) {
MockCBPeripheral* peripheral_mock = GetMockCBPeripheral(device);

Powered by Google App Engine
This is Rietveld 408576698