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

Issue 2785383002: Update unit tests for BluetoothDevice::GetPrimaryServicesByUUID() etc. (Closed)

Created:
3 years, 8 months ago by juncai
Modified:
3 years, 8 months ago
Reviewers:
ortuno
CC:
chromium-reviews, ortuno+watch_chromium.org, scheib+watch_chromium.org
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Update unit tests for BluetoothDevice::GetPrimaryServicesByUUID() etc. This is a follow-up CL to address comments at: https://codereview.chromium.org/2744243008/diff/80001/device/bluetooth/bluetooth_device_unittest.cc This CL does the following: 1. Updated test code for BluetoothDevice::GetPrimaryServicesByUUID() 2. Moved BluetoothDevice::GetCharacteristicsByUUID() to BluetoothRemoteGattService::GetCharacteristicsByUUID() 3. Removed BluetoothDevice::GetDescriptorsByUUID() since there is BluetoothRemoteGattCharacteristic::GetDescriptorsByUUID() BUG=552022 Review-Url: https://codereview.chromium.org/2785383002 Cr-Commit-Position: refs/heads/master@{#462169} Committed: https://chromium.googlesource.com/chromium/src/+/b594d33b1b5a11701884592ba7c82babe0119516

Patch Set 1 : update unit tests for BluetoothDevice::GetPrimaryServicesByUUID() etc. #

Total comments: 34

Patch Set 2 : address comments #

Patch Set 3 : address comments #

Total comments: 6

Patch Set 4 : address more comments #

Patch Set 5 : address more comments #

Total comments: 16

Patch Set 6 : address comments #

Total comments: 4

Patch Set 7 : added TODO #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+138 lines, -147 lines) Patch
M content/browser/bluetooth/web_bluetooth_service_impl.cc View 1 2 3 4 2 chunks +7 lines, -9 lines 0 comments Download
M device/bluetooth/bluetooth_device.h View 1 2 3 4 2 chunks +0 lines, -10 lines 0 comments Download
M device/bluetooth/bluetooth_device.cc View 1 2 3 4 1 chunk +0 lines, -37 lines 0 comments Download
M device/bluetooth/bluetooth_device_unittest.cc View 1 2 3 4 5 6 4 chunks +49 lines, -91 lines 2 comments Download
M device/bluetooth/bluetooth_remote_gatt_service.h View 1 2 3 4 2 chunks +4 lines, -0 lines 0 comments Download
M device/bluetooth/bluetooth_remote_gatt_service.cc View 1 2 3 4 1 chunk +17 lines, -0 lines 0 comments Download
M device/bluetooth/bluetooth_remote_gatt_service_unittest.cc View 1 2 3 4 5 1 chunk +61 lines, -0 lines 0 comments Download

Messages

Total messages: 48 (34 generated)
juncai
Please take a look.
3 years, 8 months ago (2017-03-31 03:20:13 UTC) #6
ortuno
https://codereview.chromium.org/2785383002/diff/1/device/bluetooth/bluetooth_device_unittest.cc File device/bluetooth/bluetooth_device_unittest.cc (right): https://codereview.chromium.org/2785383002/diff/1/device/bluetooth/bluetooth_device_unittest.cc#newcode69 device/bluetooth/bluetooth_device_unittest.cc:69: service_uuids_.push_back("00000000-0000-1000-8000-00805f9b34fb"); Please use existing service uuids: https://cs.chromium.org/chromium/src/device/bluetooth/test/bluetooth_test.h?l=90 I would ...
3 years, 8 months ago (2017-04-03 03:36:38 UTC) #7
juncai
https://codereview.chromium.org/2785383002/diff/1/device/bluetooth/bluetooth_device_unittest.cc File device/bluetooth/bluetooth_device_unittest.cc (right): https://codereview.chromium.org/2785383002/diff/1/device/bluetooth/bluetooth_device_unittest.cc#newcode69 device/bluetooth/bluetooth_device_unittest.cc:69: service_uuids_.push_back("00000000-0000-1000-8000-00805f9b34fb"); On 2017/04/03 03:36:37, ortuno wrote: > Please use ...
3 years, 8 months ago (2017-04-04 03:03:42 UTC) #17
ortuno
https://codereview.chromium.org/2785383002/diff/1/device/bluetooth/bluetooth_device_unittest.cc File device/bluetooth/bluetooth_device_unittest.cc (right): https://codereview.chromium.org/2785383002/diff/1/device/bluetooth/bluetooth_device_unittest.cc#newcode80 device/bluetooth/bluetooth_device_unittest.cc:80: std::vector<std::string> service_uuids_; On 2017/04/04 at 03:03:42, juncai wrote: > ...
3 years, 8 months ago (2017-04-04 03:32:12 UTC) #18
juncai
https://codereview.chromium.org/2785383002/diff/1/device/bluetooth/bluetooth_device_unittest.cc File device/bluetooth/bluetooth_device_unittest.cc (right): https://codereview.chromium.org/2785383002/diff/1/device/bluetooth/bluetooth_device_unittest.cc#newcode80 device/bluetooth/bluetooth_device_unittest.cc:80: std::vector<std::string> service_uuids_; On 2017/04/04 03:32:11, ortuno wrote: > On ...
3 years, 8 months ago (2017-04-04 20:33:40 UTC) #25
ortuno
https://codereview.chromium.org/2785383002/diff/80001/device/bluetooth/bluetooth_device_unittest.cc File device/bluetooth/bluetooth_device_unittest.cc (right): https://codereview.chromium.org/2785383002/diff/80001/device/bluetooth/bluetooth_device_unittest.cc#newcode69 device/bluetooth/bluetooth_device_unittest.cc:69: #if defined(OS_WIN) // TODO(crbug.com/507419): Check connection once CreateGattConnection is ...
3 years, 8 months ago (2017-04-04 22:14:12 UTC) #28
juncai
https://codereview.chromium.org/2785383002/diff/80001/device/bluetooth/bluetooth_device_unittest.cc File device/bluetooth/bluetooth_device_unittest.cc (right): https://codereview.chromium.org/2785383002/diff/80001/device/bluetooth/bluetooth_device_unittest.cc#newcode69 device/bluetooth/bluetooth_device_unittest.cc:69: #if defined(OS_WIN) On 2017/04/04 22:14:12, ortuno wrote: > // ...
3 years, 8 months ago (2017-04-05 00:36:46 UTC) #31
ortuno
https://codereview.chromium.org/2785383002/diff/80001/device/bluetooth/bluetooth_remote_gatt_service_unittest.cc File device/bluetooth/bluetooth_remote_gatt_service_unittest.cc (right): https://codereview.chromium.org/2785383002/diff/80001/device/bluetooth/bluetooth_remote_gatt_service_unittest.cc#newcode194 device/bluetooth/bluetooth_remote_gatt_service_unittest.cc:194: SimulateGattServicesDiscovered(device, services); On 2017/04/05 at 00:36:46, juncai wrote: > ...
3 years, 8 months ago (2017-04-05 00:53:10 UTC) #32
ortuno
Also lgtm!
3 years, 8 months ago (2017-04-05 00:53:20 UTC) #33
juncai
https://codereview.chromium.org/2785383002/diff/80001/device/bluetooth/bluetooth_remote_gatt_service_unittest.cc File device/bluetooth/bluetooth_remote_gatt_service_unittest.cc (right): https://codereview.chromium.org/2785383002/diff/80001/device/bluetooth/bluetooth_remote_gatt_service_unittest.cc#newcode194 device/bluetooth/bluetooth_remote_gatt_service_unittest.cc:194: SimulateGattServicesDiscovered(device, services); On 2017/04/05 00:53:10, ortuno wrote: > On ...
3 years, 8 months ago (2017-04-05 19:01:23 UTC) #40
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/2785383002/120001
3 years, 8 months ago (2017-04-05 19:01:59 UTC) #43
commit-bot: I haz the power
Committed patchset #7 (id:120001) as https://chromium.googlesource.com/chromium/src/+/b594d33b1b5a11701884592ba7c82babe0119516
3 years, 8 months ago (2017-04-05 19:15:02 UTC) #46
ortuno
https://codereview.chromium.org/2785383002/diff/120001/device/bluetooth/bluetooth_device_unittest.cc File device/bluetooth/bluetooth_device_unittest.cc (right): https://codereview.chromium.org/2785383002/diff/120001/device/bluetooth/bluetooth_device_unittest.cc#newcode81 device/bluetooth/bluetooth_device_unittest.cc:81: service_uuids.push_back(duplicate_service_uuid_.canonical_value()); Out of curiosity why did you end up ...
3 years, 8 months ago (2017-04-05 22:50:00 UTC) #47
juncai
3 years, 8 months ago (2017-04-05 22:55:15 UTC) #48
Message was sent while issue was closed.
https://codereview.chromium.org/2785383002/diff/120001/device/bluetooth/bluet...
File device/bluetooth/bluetooth_device_unittest.cc (right):

https://codereview.chromium.org/2785383002/diff/120001/device/bluetooth/bluet...
device/bluetooth/bluetooth_device_unittest.cc:81:
service_uuids.push_back(duplicate_service_uuid_.canonical_value());
On 2017/04/05 22:50:00, ortuno wrote:
> Out of curiosity why did you end up using push_back instead of an initializer
> list?

From what I see, other places in this file use push_back:
https://cs.chromium.org/chromium/src/device/bluetooth/bluetooth_device_unitte...
So I thought just following the same pattern to make it consistent.

Powered by Google App Engine
This is Rietveld 408576698