| Index: device/bluetooth/test/mock_bluetooth_central_manager.mm
|
| diff --git a/device/bluetooth/test/mock_bluetooth_central_manager.mm b/device/bluetooth/test/mock_bluetooth_central_manager.mm
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..8759e7f23f43d7164eb0a280dba052c6aac9698c
|
| --- /dev/null
|
| +++ b/device/bluetooth/test/mock_bluetooth_central_manager.mm
|
| @@ -0,0 +1,37 @@
|
| +// Copyright 2015 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +#import "mock_bluetooth_central_manager.h"
|
| +
|
| +@implementation MockCentralManager
|
| +
|
| +@synthesize scanForPeripheralsWasCalled = _scanForPeripheralsWasCalled;
|
| +@synthesize stopScanWasCalled = _stopScanWasCalled;
|
| +
|
| +- (instancetype)init {
|
| + _scanForPeripheralsWasCalled = NO;
|
| + _stopScanWasCalled = NO;
|
| + return self;
|
| +}
|
| +
|
| +- (instancetype)initWithDelegate:(id<CBCentralManagerDelegate>)delegate
|
| + queue:(dispatch_queue_t)queue
|
| + options:(NSDictionary*)options {
|
| + return [self init];
|
| +}
|
| +
|
| +- (CBCentralManagerState)state {
|
| + return CBCentralManagerStatePoweredOn;
|
| +}
|
| +
|
| +- (void)scanForPeripheralsWithServices:(NSArray*)serviceUUIDs
|
| + options:(NSDictionary*)options {
|
| + _scanForPeripheralsWasCalled = YES;
|
| +}
|
| +
|
| +- (void)stopScan {
|
| + _stopScanWasCalled = YES;
|
| +}
|
| +
|
| +@end
|
|
|