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

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

Issue 1260533003: BluetoothTest.* tests in bluetooth_device_unittests.cc run on Mac (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@test2
Patch Set: Created 5 years, 4 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 | « device/bluetooth/test/android/java/src/org/chromium/device/bluetooth/Fakes.java ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 749f744a488ad1b4a7bd60a17b78b1bd39610b35..8f99087a49b184ccf298963238c59ac3aaa3bda0 100644
--- a/device/bluetooth/test/bluetooth_test_mac.mm
+++ b/device/bluetooth/test/bluetooth_test_mac.mm
@@ -2,9 +2,10 @@
// 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"
+
#include "base/strings/string_number_conversions.h"
#include "device/bluetooth/bluetooth_adapter_mac.h"
-#include "device/bluetooth/test/bluetooth_test_mac.h"
#include "device/bluetooth/test/mock_bluetooth_central_manager_mac.h"
#include "third_party/ocmock/OCMock/OCMock.h"
@@ -18,19 +19,20 @@ namespace device {
namespace {
-CBPeripheral* CreateMockPeripheral(NSString* identifier) {
+CBPeripheral* CreateMockPeripheral(NSString* peripheral_identifier) {
Class peripheral_class = NSClassFromString(@"CBPeripheral");
id mock_peripheral = [OCMockObject mockForClass:[peripheral_class class]];
- [static_cast<CBPeripheral*>(
- [[mock_peripheral stub] andReturnValue:@(CBPeripheralStateDisconnected)])
+ [[[mock_peripheral stub] andReturnValue:@(CBPeripheralStateDisconnected)]
performSelector:@selector(state)];
- [[[mock_peripheral stub] andReturn:[NSString string]] name];
Class uuid_class = NSClassFromString(@"NSUUID");
[[[mock_peripheral stub]
andReturn:[[uuid_class performSelector:@selector(UUID)]
performSelector:@selector(initWithUUIDString:)
- withObject:identifier]] identifier];
-
+ withObject:peripheral_identifier]]
+ performSelector:@selector(identifier)];
+ [[[mock_peripheral stub]
+ andReturn:[NSString stringWithUTF8String:BluetoothTest::kTestDeviceName
+ .c_str()]] name];
return mock_peripheral;
}
« no previous file with comments | « device/bluetooth/test/android/java/src/org/chromium/device/bluetooth/Fakes.java ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698