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

Issue 2874873003: bluetooth: Implement simulateGATTConnectionResponse() (Closed)

Created:
3 years, 7 months ago by ortuno
Modified:
3 years, 6 months ago
Reviewers:
scheib, dcheng
CC:
Aaron Boodman, abarth-chromium, blink-reviews, chromium-reviews, darin (slow to review), darin-cc_chromium.org, jam, ortuno+watch_chromium.org, qsr+mojo_chromium.org, scheib+watch_chromium.org, viettrungluu+watch_chromium.org, yzshen+watch_chromium.org
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

bluetooth: Implement setNextGATTConnectionResponse() Sets the next GATT Connection request response for peripheral with |address| to |code|. |code| could be an HCI Error Code from BT 4.2 Vol 2 Part D 1.3 List Of Error Codes or a number outside that range returned by specific platforms e.g. Android returns 0x101 to signal a GATT failure BUG=719814 Review-Url: https://codereview.chromium.org/2874873003 Cr-Commit-Position: refs/heads/master@{#476940} Committed: https://chromium.googlesource.com/chromium/src/+/a7f7ed7b9e28bc9da80a4d36297efa9e3e31871c

Patch Set 1 #

Patch Set 2 : Clean up #

Patch Set 3 : Fix docs #

Patch Set 4 : Merge branch 'bluetooth-generate-with-headers' into bluetooth-simulate-gatt-discovery-complete #

Total comments: 12

Patch Set 5 : fix generated test #

Patch Set 6 : moar cleanup #

Patch Set 7 : moar cleanup #

Patch Set 8 : format #

Patch Set 9 : clean up #

Patch Set 10 : clean up #

Total comments: 6

Patch Set 11 : Address moar comments #

Patch Set 12 : Point to another issue #

Patch Set 13 : Improve comments #

Total comments: 4

Patch Set 14 : Address dcheng's comments #

Patch Set 15 : fix #

Unified diffs Side-by-side diffs Delta from patch set Stats (+239 lines, -84 lines) Patch
M content/browser/bluetooth/bluetooth_device_chooser_controller.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +1 line, -0 lines 0 comments Download
M device/bluetooth/public/interfaces/test/fake_bluetooth.mojom View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +17 lines, -0 lines 0 comments Download
M device/bluetooth/test/fake_central.h View 1 2 3 4 5 6 7 1 chunk +4 lines, -0 lines 0 comments Download
M device/bluetooth/test/fake_central.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +17 lines, -1 line 0 comments Download
M device/bluetooth/test/fake_peripheral.h View 1 2 3 4 5 6 7 8 9 10 3 chunks +26 lines, -3 lines 0 comments Download
M device/bluetooth/test/fake_peripheral.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 4 chunks +51 lines, -6 lines 0 comments Download
M third_party/WebKit/LayoutTests/bluetooth/script-tests/server/invalid-service-name.js View 1 2 3 4 5 6 7 8 9 10 1 chunk +3 lines, -6 lines 0 comments Download
M third_party/WebKit/LayoutTests/bluetooth/script-tests/server/no-permission-for-any-service.js View 1 2 3 4 2 chunks +3 lines, -7 lines 0 comments Download
M third_party/WebKit/LayoutTests/bluetooth/server/connect/connection-succeeds.html View 1 2 3 4 5 6 7 1 chunk +8 lines, -5 lines 0 comments Download
M third_party/WebKit/LayoutTests/bluetooth/server/connect/garbage-collection-ran-during-success.html View 1 2 3 4 5 6 7 1 chunk +11 lines, -6 lines 0 comments Download
M third_party/WebKit/LayoutTests/bluetooth/server/connect/get-same-gatt-server.html View 1 2 3 4 5 6 7 1 chunk +16 lines, -8 lines 0 comments Download
M third_party/WebKit/LayoutTests/bluetooth/server/device-same-object.html View 1 2 3 4 5 6 7 1 chunk +9 lines, -6 lines 0 comments Download
M third_party/WebKit/LayoutTests/bluetooth/server/getPrimaryService/gen-invalid-service-name.html View 1 2 3 4 5 6 7 8 9 10 1 chunk +3 lines, -6 lines 0 comments Download
M third_party/WebKit/LayoutTests/bluetooth/server/getPrimaryService/gen-no-permission-for-any-service.html View 1 2 3 4 1 chunk +3 lines, -7 lines 0 comments Download
M third_party/WebKit/LayoutTests/bluetooth/server/getPrimaryServices/gen-invalid-service-name.html View 1 2 3 4 5 6 7 8 9 10 1 chunk +3 lines, -6 lines 0 comments Download
M third_party/WebKit/LayoutTests/bluetooth/server/getPrimaryServices/gen-no-permission-for-any-service.html View 1 2 3 4 1 chunk +3 lines, -7 lines 0 comments Download
M third_party/WebKit/LayoutTests/bluetooth/server/getPrimaryServices/gen-no-permission-for-any-service-with-uuid.html View 1 2 3 4 1 chunk +3 lines, -7 lines 0 comments Download
M third_party/WebKit/LayoutTests/resources/bluetooth/bluetooth-helpers.js View 1 2 3 4 5 6 7 4 chunks +42 lines, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/resources/bluetooth/web-bluetooth-test.js View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +16 lines, -3 lines 0 comments Download

Messages

Total messages: 62 (43 generated)
ortuno
scheib: PTAL. Two things to note: 1. As discussed using unsigned short for |code|. 2. ...
3 years, 7 months ago (2017-05-11 23:40:56 UTC) #8
ortuno
https://codereview.chromium.org/2874873003/diff/60001/third_party/WebKit/LayoutTests/resources/bluetooth/bluetooth-helpers.js File third_party/WebKit/LayoutTests/resources/bluetooth/bluetooth-helpers.js (right): https://codereview.chromium.org/2874873003/diff/60001/third_party/WebKit/LayoutTests/resources/bluetooth/bluetooth-helpers.js#newcode457 third_party/WebKit/LayoutTests/resources/bluetooth/bluetooth-helpers.js:457: function getConnectedHealthThermometerDevice( Forgot to mention this. This changes our ...
3 years, 7 months ago (2017-05-12 00:53:44 UTC) #12
scheib
https://codereview.chromium.org/2874873003/diff/60001/device/bluetooth/test/fake_peripheral.cc File device/bluetooth/test/fake_peripheral.cc (right): https://codereview.chromium.org/2874873003/diff/60001/device/bluetooth/test/fake_peripheral.cc#newcode32 device/bluetooth/test/fake_peripheral.cc:32: CreateGattConnectionCallbacks callbacks = Call up to BluetoothDevice::DidConnectGatt DidFailToConnectGatt, and ...
3 years, 7 months ago (2017-05-12 05:43:56 UTC) #13
ortuno
https://codereview.chromium.org/2874873003/diff/60001/device/bluetooth/test/fake_peripheral.cc File device/bluetooth/test/fake_peripheral.cc (right): https://codereview.chromium.org/2874873003/diff/60001/device/bluetooth/test/fake_peripheral.cc#newcode32 device/bluetooth/test/fake_peripheral.cc:32: CreateGattConnectionCallbacks callbacks = On 2017/05/12 at 05:43:55, scheib wrote: ...
3 years, 7 months ago (2017-05-15 07:01:31 UTC) #19
scheib
3 years, 7 months ago (2017-05-16 04:46:24 UTC) #20
ortuno
I've been looking at our tests and I think we are over engineering it here. ...
3 years, 7 months ago (2017-05-16 07:04:56 UTC) #21
ortuno
scheib: PTAL
3 years, 7 months ago (2017-05-27 00:50:27 UTC) #30
scheib
https://codereview.chromium.org/2874873003/diff/240001/device/bluetooth/test/fake_peripheral.cc File device/bluetooth/test/fake_peripheral.cc (right): https://codereview.chromium.org/2874873003/diff/240001/device/bluetooth/test/fake_peripheral.cc#newcode105 device/bluetooth/test/fake_peripheral.cc:105: return system_connected_ || gatt_connected_; Our Android code at least ...
3 years, 6 months ago (2017-05-30 20:54:14 UTC) #31
ortuno
Thanks! https://codereview.chromium.org/2874873003/diff/240001/device/bluetooth/test/fake_peripheral.cc File device/bluetooth/test/fake_peripheral.cc (right): https://codereview.chromium.org/2874873003/diff/240001/device/bluetooth/test/fake_peripheral.cc#newcode105 device/bluetooth/test/fake_peripheral.cc:105: return system_connected_ || gatt_connected_; On 2017/05/30 at 20:54:13, ...
3 years, 6 months ago (2017-05-31 05:47:27 UTC) #34
scheib
https://codereview.chromium.org/2874873003/diff/240001/device/bluetooth/test/fake_peripheral.cc File device/bluetooth/test/fake_peripheral.cc (right): https://codereview.chromium.org/2874873003/diff/240001/device/bluetooth/test/fake_peripheral.cc#newcode105 device/bluetooth/test/fake_peripheral.cc:105: return system_connected_ || gatt_connected_; On 2017/05/31 05:47:27, ortuno wrote: ...
3 years, 6 months ago (2017-05-31 17:22:21 UTC) #37
scheib
Thanks for chat. LGTM but please add doc: https://codereview.chromium.org/2874873003/diff/240001/device/bluetooth/test/fake_peripheral.cc File device/bluetooth/test/fake_peripheral.cc (right): https://codereview.chromium.org/2874873003/diff/240001/device/bluetooth/test/fake_peripheral.cc#newcode105 device/bluetooth/test/fake_peripheral.cc:105: return ...
3 years, 6 months ago (2017-06-01 05:03:30 UTC) #38
ortuno
I opened two[1][2] new issue to better explain the problems and referred to them in ...
3 years, 6 months ago (2017-06-02 06:52:35 UTC) #39
ortuno
dcheng: PTAL at mojom.
3 years, 6 months ago (2017-06-02 06:52:55 UTC) #41
dcheng
ipc lgtm https://codereview.chromium.org/2874873003/diff/300001/device/bluetooth/test/fake_central.cc File device/bluetooth/test/fake_central.cc (right): https://codereview.chromium.org/2874873003/diff/300001/device/bluetooth/test/fake_central.cc#newcode52 device/bluetooth/test/fake_central.cc:52: DCHECK(device_iter != devices_.end()); Might be worth handling ...
3 years, 6 months ago (2017-06-02 16:07:35 UTC) #46
ortuno
Thanks! fyi: I ended up changing SetNextGattResponse's callback to take a bool to indicate failure. ...
3 years, 6 months ago (2017-06-05 01:36:09 UTC) #48
commit-bot: I haz the power
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2874873003/320001
3 years, 6 months ago (2017-06-05 01:36:23 UTC) #50
commit-bot: I haz the power
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2874873003/340001
3 years, 6 months ago (2017-06-05 04:34:36 UTC) #58
commit-bot: I haz the power
Committed patchset #15 (id:340001) as https://chromium.googlesource.com/chromium/src/+/a7f7ed7b9e28bc9da80a4d36297efa9e3e31871c
3 years, 6 months ago (2017-06-05 04:40:32 UTC) #61
blundell
3 years, 6 months ago (2017-06-05 09:16:38 UTC) #62
Message was sent while issue was closed.
A revert of this CL (patchset #15 id:340001) has been created in
https://codereview.chromium.org/2921233002/ by blundell@chromium.org.

The reason for reverting is: Seems to cause device-same-object test to fail
consistently on Android, e.g.:

https://luci-logdog.appspot.com/v/?s=chromium%2Fbb%2Fchromium.webkit%2FWebKit...
.

Powered by Google App Engine
This is Rietveld 408576698