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

Side by Side Diff: content/shell/browser/layout_test/layout_test_bluetooth_adapter_provider.h

Issue 1217983004: bluetooth: browser-side implementation of writeValue. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@bluetooth-origin
Patch Set: Remove comment 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CONTENT_SHELL_BROWSER_LAYOUT_TEST_LAYOUT_TEST_BLUETOOTH_ADAPTER_PROVIDER _H_ 5 #ifndef CONTENT_SHELL_BROWSER_LAYOUT_TEST_LAYOUT_TEST_BLUETOOTH_ADAPTER_PROVIDER _H_
6 #define CONTENT_SHELL_BROWSER_LAYOUT_TEST_LAYOUT_TEST_BLUETOOTH_ADAPTER_PROVIDER _H_ 6 #define CONTENT_SHELL_BROWSER_LAYOUT_TEST_LAYOUT_TEST_BLUETOOTH_ADAPTER_PROVIDER _H_
7 7
8 #include "base/callback.h" 8 #include "base/callback.h"
9 #include "device/bluetooth/bluetooth_adapter_factory.h" 9 #include "device/bluetooth/bluetooth_adapter_factory.h"
10 #include "device/bluetooth/test/mock_bluetooth_adapter.h" 10 #include "device/bluetooth/test/mock_bluetooth_adapter.h"
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 // - |GetBluetoothClass| returns 0x1F00. "Unspecified Device Class": see 94 // - |GetBluetoothClass| returns 0x1F00. "Unspecified Device Class": see
95 // bluetooth.org/en-us/specification/assigned-numbers/baseband 95 // bluetooth.org/en-us/specification/assigned-numbers/baseband
96 // - |GetVendorIDSource| returns |BluetoothDevice::VENDOR_ID_BLUETOOTH|. 96 // - |GetVendorIDSource| returns |BluetoothDevice::VENDOR_ID_BLUETOOTH|.
97 // - |GetVendorID| returns 0xFFFF. 97 // - |GetVendorID| returns 0xFFFF.
98 // - |GetProductID| returns 1. 98 // - |GetProductID| returns 1.
99 // - |GetDeviceID| returns 2. 99 // - |GetDeviceID| returns 2.
100 // - |IsPaired| returns true. 100 // - |IsPaired| returns true.
101 // - |GetUUIDs| returns a list with two UUIDs: "1800" and "1801". 101 // - |GetUUIDs| returns a list with two UUIDs: "1800" and "1801".
102 // - |GetGattServices| returns a list with one service "Generic Access". 102 // - |GetGattServices| returns a list with one service "Generic Access".
103 // "Generic Access" has a "Device Name" characteristic, with a value of 103 // "Generic Access" has a "Device Name" characteristic, with a value of
104 // "Empty Mock Device Name", and a "Reconnection Address" characteristic 104 // "Empty Mock Device Name" that can be read but not written, and a
105 // which can't be read. 105 // "Reconnection Address" characteristic which can't be read, but can be
106 // written.
106 static scoped_ptr<testing::NiceMock<device::MockBluetoothDevice>> 107 static scoped_ptr<testing::NiceMock<device::MockBluetoothDevice>>
107 GetEmptyDevice(device::MockBluetoothAdapter* adapter, 108 GetEmptyDevice(device::MockBluetoothAdapter* adapter,
108 const std::string& device_name = "Empty Mock Device"); 109 const std::string& device_name = "Empty Mock Device");
109 110
110 // Returns a fake |ConnectableDevice| with the same characteristics as 111 // Returns a fake |ConnectableDevice| with the same characteristics as
111 // |EmptyDevice| except: 112 // |EmptyDevice| except:
112 // - |CreateGattConnection| runs success callback with a 113 // - |CreateGattConnection| runs success callback with a
113 // fake BluetoothGattConnection as argument. 114 // fake BluetoothGattConnection as argument.
114 static scoped_ptr<testing::NiceMock<device::MockBluetoothDevice>> 115 static scoped_ptr<testing::NiceMock<device::MockBluetoothDevice>>
115 GetConnectableDevice(device::MockBluetoothAdapter* adapter); 116 GetConnectableDevice(device::MockBluetoothAdapter* adapter);
(...skipping 22 matching lines...) Expand all
138 // - |GetService| returns |service|. 139 // - |GetService| returns |service|.
139 // - |IsNotifying| returns false. 140 // - |IsNotifying| returns false.
140 static scoped_ptr<testing::NiceMock<device::MockBluetoothGattCharacteristic>> 141 static scoped_ptr<testing::NiceMock<device::MockBluetoothGattCharacteristic>>
141 GetGattCharacteristic(device::MockBluetoothGattService* service, 142 GetGattCharacteristic(device::MockBluetoothGattService* service,
142 const std::string& uuid); 143 const std::string& uuid);
143 }; 144 };
144 145
145 } // namespace content 146 } // namespace content
146 147
147 #endif // CONTENT_SHELL_BROWSER_LAYOUT_TEST_LAYOUT_TEST_BLUETOOTH_ADAPTER_PROVI DER_H_ 148 #endif // CONTENT_SHELL_BROWSER_LAYOUT_TEST_LAYOUT_TEST_BLUETOOTH_ADAPTER_PROVI DER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698