summaryrefslogtreecommitdiffstats
path: root/device
diff options
context:
space:
mode:
authorkeybuk@chromium.org <keybuk@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-03-13 05:51:19 +0000
committerkeybuk@chromium.org <keybuk@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-03-13 05:51:19 +0000
commit802cf8c76c91e877ba9d283eff8bb5d85aca0a5d (patch)
tree811e9729c8067488fffad762d5f8a00e65b5857b /device
parent8395d799b84405be26391ddcbbcf963429179202 (diff)
downloadchromium_src-802cf8c76c91e877ba9d283eff8bb5d85aca0a5d.zip
chromium_src-802cf8c76c91e877ba9d283eff8bb5d85aca0a5d.tar.gz
chromium_src-802cf8c76c91e877ba9d283eff8bb5d85aca0a5d.tar.bz2
Bluetooth: extend JavaScript Device object
The Device object is currently somewhat minimal. Application developers need additional information about devices in order to make decisions about whether a specific Device is the correct one to interact with. Expose information about the device's Bluetooth class, the device type parsed from that by Chrome and the information from the Device ID specification if supported by the device. BUG=350433 TEST=browser_tests --gtest_filter=BluetoothApiTest.DeviceInfo Review URL: https://codereview.chromium.org/191313004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@256765 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'device')
-rw-r--r--device/bluetooth/test/mock_bluetooth_device.cc10
1 files changed, 10 insertions, 0 deletions
diff --git a/device/bluetooth/test/mock_bluetooth_device.cc b/device/bluetooth/test/mock_bluetooth_device.cc
index c1fe56f..4804dc0 100644
--- a/device/bluetooth/test/mock_bluetooth_device.cc
+++ b/device/bluetooth/test/mock_bluetooth_device.cc
@@ -24,6 +24,16 @@ MockBluetoothDevice::MockBluetoothDevice(MockBluetoothAdapter* adapter,
.WillByDefault(testing::Return(name_));
ON_CALL(*this, GetAddress())
.WillByDefault(testing::Return(address_));
+ ON_CALL(*this, GetDeviceType())
+ .WillByDefault(testing::Return(DEVICE_UNKNOWN));
+ ON_CALL(*this, GetVendorIDSource())
+ .WillByDefault(testing::Return(VENDOR_ID_UNKNOWN));
+ ON_CALL(*this, GetVendorID())
+ .WillByDefault(testing::Return(0));
+ ON_CALL(*this, GetProductID())
+ .WillByDefault(testing::Return(0));
+ ON_CALL(*this, GetDeviceID())
+ .WillByDefault(testing::Return(0));
ON_CALL(*this, IsPaired())
.WillByDefault(testing::Return(paired));
ON_CALL(*this, IsConnected())