4 years, 11 months ago
(2015-06-02 19:50:39 UTC)
#3
@jyasskin: PTAL
Jeffrey Yasskin
https://codereview.chromium.org/1146163005/diff/20001/LayoutTests/bluetooth/getCharacteristic.html File LayoutTests/bluetooth/getCharacteristic.html (right): https://codereview.chromium.org/1146163005/diff/20001/LayoutTests/bluetooth/getCharacteristic.html#newcode9 LayoutTests/bluetooth/getCharacteristic.html:9: var service1 = "00001800-0000-1000-8000-00805f9b34fb"; Comment what these services and ...
4 years, 11 months ago
(2015-06-03 00:24:05 UTC)
#4
https://codereview.chromium.org/1146163005/diff/20001/LayoutTests/bluetooth/g...
File LayoutTests/bluetooth/getCharacteristic.html (right):
https://codereview.chromium.org/1146163005/diff/20001/LayoutTests/bluetooth/g...
LayoutTests/bluetooth/getCharacteristic.html:9: var service1 =
"00001800-0000-1000-8000-00805f9b34fb";
Comment what these services and characteristics are, or give them descriptive
names.
https://codereview.chromium.org/1146163005/diff/20001/LayoutTests/bluetooth/g...
LayoutTests/bluetooth/getCharacteristic.html:16: return
device.connectGATT().then(function(gattServer) {
I think this could be:
sequential_promise_test(function() {
testRunner.setBluetoothMockDataSet('ConnectableDeviceAdapter');
return navigator.bluetooth.requestDevice().then(function(device) {
return device.connectGATT();
}).then(function(gattServer) {
return gattServer.getPrimaryService(service1);
}).then(function(service) {
testRunner.setBluetoothMockDataSet('EmptyAdapter');
return service.getCharacteristic(characteristic1).then(function() {
assert_unreached("Device went out of range, should fail.");
}, function(e) {
assert_equals(e.name, "NetworkError");
});
});
});
https://codereview.chromium.org/1146163005/diff/20001/LayoutTests/bluetooth/g...
LayoutTests/bluetooth/getCharacteristic.html:36: return
service.getCharacteristic(characteristic2);
It'd be better to query for a characteristic that definitely doesn't appear on
the Generic Access service, rather than Appearance which we someday might change
the ConnectableDeviceAdapter to include.
https://codereview.chromium.org/1146163005/diff/20001/Source/modules/bluetoot...
File Source/modules/bluetooth/BluetoothGATTCharacteristic.cpp (right):
https://codereview.chromium.org/1146163005/diff/20001/Source/modules/bluetoot...
Source/modules/bluetooth/BluetoothGATTCharacteristic.cpp:31: return new
BluetoothGATTCharacteristic(*webCharacteristic);
This is a little weird (was probably weird in your other patch too, but I didn't
look as closely). Why is it right to copy the WebBluetoothGATTCharacteristic
into the BluetoothGATTCharacteristic instead of having
BluetoothGATTCharacteristic store an OwnPtr<WebBluetoothGATTCharacteristic> and
just take ownership of the already-allocated one?
https://codereview.chromium.org/1146163005/diff/20001/Source/modules/bluetoot...
File Source/modules/bluetooth/BluetoothGATTService.idl (right):
https://codereview.chromium.org/1146163005/diff/20001/Source/modules/bluetoot...
Source/modules/bluetooth/BluetoothGATTService.idl:9: typedef DOMString
BluetoothCharacteristicUUID;
Add the same TODO here as you have in GATTRemoteServer, I think.
ortuno
Patchset #2 (id:40001) has been deleted
4 years, 11 months ago
(2015-06-03 21:49:51 UTC)
#5
Patchset #2 (id:40001) has been deleted
ortuno
Patchset #2 (id:60001) has been deleted
4 years, 11 months ago
(2015-06-03 21:55:17 UTC)
#6
Patchset #2 (id:60001) has been deleted
ortuno
@jyasskin: Ready for review again! https://codereview.chromium.org/1146163005/diff/20001/LayoutTests/bluetooth/getCharacteristic.html File LayoutTests/bluetooth/getCharacteristic.html (right): https://codereview.chromium.org/1146163005/diff/20001/LayoutTests/bluetooth/getCharacteristic.html#newcode9 LayoutTests/bluetooth/getCharacteristic.html:9: var service1 = "00001800-0000-1000-8000-00805f9b34fb"; ...
4 years, 11 months ago
(2015-06-03 21:57:04 UTC)
#7
@jyasskin: Ready for review again!
https://codereview.chromium.org/1146163005/diff/20001/LayoutTests/bluetooth/g...
File LayoutTests/bluetooth/getCharacteristic.html (right):
https://codereview.chromium.org/1146163005/diff/20001/LayoutTests/bluetooth/g...
LayoutTests/bluetooth/getCharacteristic.html:9: var service1 =
"00001800-0000-1000-8000-00805f9b34fb";
On 2015/06/03 at 00:24:04, Jeffrey Yasskin wrote:
> Comment what these services and characteristics are, or give them descriptive
names.
Done.
https://codereview.chromium.org/1146163005/diff/20001/LayoutTests/bluetooth/g...
LayoutTests/bluetooth/getCharacteristic.html:16: return
device.connectGATT().then(function(gattServer) {
On 2015/06/03 at 00:24:04, Jeffrey Yasskin wrote:
> I think this could be:
>
> sequential_promise_test(function() {
> testRunner.setBluetoothMockDataSet('ConnectableDeviceAdapter');
> return navigator.bluetooth.requestDevice().then(function(device) {
> return device.connectGATT();
> }).then(function(gattServer) {
> return gattServer.getPrimaryService(service1);
> }).then(function(service) {
> testRunner.setBluetoothMockDataSet('EmptyAdapter');
> return service.getCharacteristic(characteristic1).then(function() {
> assert_unreached("Device went out of range, should fail.");
> }, function(e) {
> assert_equals(e.name, "NetworkError");
> });
> });
> });
Done.
https://codereview.chromium.org/1146163005/diff/20001/LayoutTests/bluetooth/g...
LayoutTests/bluetooth/getCharacteristic.html:36: return
service.getCharacteristic(characteristic2);
On 2015/06/03 at 00:24:04, Jeffrey Yasskin wrote:
> It'd be better to query for a characteristic that definitely doesn't appear on
the Generic Access service, rather than Appearance which we someday might change
the ConnectableDeviceAdapter to include.
Done.
https://codereview.chromium.org/1146163005/diff/20001/Source/modules/bluetoot...
File Source/modules/bluetooth/BluetoothGATTCharacteristic.cpp (right):
https://codereview.chromium.org/1146163005/diff/20001/Source/modules/bluetoot...
Source/modules/bluetooth/BluetoothGATTCharacteristic.cpp:31: return new
BluetoothGATTCharacteristic(*webCharacteristic);
On 2015/06/03 at 00:24:04, Jeffrey Yasskin wrote:
> This is a little weird (was probably weird in your other patch too, but I
didn't look as closely). Why is it right to copy the
WebBluetoothGATTCharacteristic into the BluetoothGATTCharacteristic instead of
having BluetoothGATTCharacteristic store an
OwnPtr<WebBluetoothGATTCharacteristic> and just take ownership of the
already-allocated one?
Changed to PassOwnPtr. OwnPtr alone won't compile.
https://codereview.chromium.org/1146163005/diff/20001/Source/modules/bluetoot...
File Source/modules/bluetooth/BluetoothGATTService.idl (right):
https://codereview.chromium.org/1146163005/diff/20001/Source/modules/bluetoot...
Source/modules/bluetooth/BluetoothGATTService.idl:9: typedef DOMString
BluetoothCharacteristicUUID;
On 2015/06/03 at 00:24:04, Jeffrey Yasskin wrote:
> Add the same TODO here as you have in GATTRemoteServer, I think.
I have another patch where I implemented some of BluetoothUUID. It seems that we
can't share typedefs across idl files. So we have to define them in all IDL
files :(
4 years, 11 months ago
(2015-06-03 23:22:53 UTC)
#8
lgtm
https://codereview.chromium.org/1146163005/diff/20001/Source/modules/bluetoot...
File Source/modules/bluetooth/BluetoothGATTService.idl (right):
https://codereview.chromium.org/1146163005/diff/20001/Source/modules/bluetoot...
Source/modules/bluetooth/BluetoothGATTService.idl:9: typedef DOMString
BluetoothCharacteristicUUID;
On 2015/06/03 21:57:04, ortuno wrote:
> On 2015/06/03 at 00:24:04, Jeffrey Yasskin wrote:
> > Add the same TODO here as you have in GATTRemoteServer, I think.
>
> I have another patch where I implemented some of BluetoothUUID. It seems that
we
> can't share typedefs across idl files. So we have to define them in all IDL
> files :(
Oh, fun.
https://codereview.chromium.org/1146163005/diff/90001/LayoutTests/bluetooth/getCharacteristic.html File LayoutTests/bluetooth/getCharacteristic.html (right): https://codereview.chromium.org/1146163005/diff/90001/LayoutTests/bluetooth/getCharacteristic.html#newcode12 LayoutTests/bluetooth/getCharacteristic.html:12: var characteristic1 = "00002a00-0000-1000-8000-00805f9b34fb"; Name these more meaninfully than ...
4 years, 11 months ago
(2015-06-04 18:30:52 UTC)
#13
Issue 1146163005: bluetooth: Blink-side implementation of getCharacteristic.
(Closed)
Created 4 years, 11 months ago by ortuno
Modified 4 years, 10 months ago
Reviewers: Jeffrey Yasskin, haraken, scheib
Base URL: https://chromium.googlesource.com/chromium/blink.git@bluetooth-characteristic-interface
Comments: 15