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

Issue 1144333007: Adding unit tests for BLE connection. (Closed)

Created:
5 years, 6 months ago by sacomoto
Modified:
5 years, 6 months ago
Reviewers:
Tim Song, msarda
CC:
chromium-reviews
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Adding unit tests for BLE connection. In order making testing more convenient, this CL does the following refactoring: - Creates a new virtual CreateCharacteristicsFinder in BluetoothLowEnergyConnection; - Starts the connection on BluetoothLowEnergyConnection after a call to Connect() (this was already suggested by tengs@ in a previous CL); - Creates a new protected constructor in BluetoothCharacteristicsFinder; - Mocks for BluetoothCharacteristicsFinder and BluetoothLowEnergyConnection; The unit tests covers the Connect() and Disconnect() execution paths. A second part will cover receiving bytes and Send(). This CL also fixes some small bugs on BluetoothLowEnergyConnection. BUG= Committed: https://crrev.com/e5da7f28b633b5f05c3b99aa019d7da6b4ff1a0b Cr-Commit-Position: refs/heads/master@{#333051}

Patch Set 1 #

Total comments: 8

Patch Set 2 : Adressing msarda's comments #

Patch Set 3 : Fixing compilation on OS X and Windows. #

Patch Set 4 : Fixing compilation on OS X and Windows 2 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+577 lines, -38 lines) Patch
M components/components_tests.gyp View 1 chunk +1 line, -0 lines 0 comments Download
M components/proximity_auth/ble/BUILD.gn View 1 chunk +1 line, -0 lines 0 comments Download
M components/proximity_auth/ble/bluetooth_low_energy_characteristics_finder.h View 1 chunk +3 lines, -0 lines 0 comments Download
M components/proximity_auth/ble/bluetooth_low_energy_characteristics_finder.cc View 1 chunk +4 lines, -0 lines 0 comments Download
M components/proximity_auth/ble/bluetooth_low_energy_connection.h View 1 2 3 2 chunks +24 lines, -16 lines 0 comments Download
M components/proximity_auth/ble/bluetooth_low_energy_connection.cc View 6 chunks +33 lines, -22 lines 0 comments Download
M components/proximity_auth/ble/bluetooth_low_energy_connection_finder.cc View 1 chunk +1 line, -0 lines 0 comments Download
A components/proximity_auth/ble/bluetooth_low_energy_connection_unittest.cc View 1 2 3 1 chunk +510 lines, -0 lines 0 comments Download

Messages

Total messages: 9 (3 generated)
sacomoto
PTAL.
5 years, 6 months ago (2015-06-04 17:49:01 UTC) #2
msarda
LGTM with some nits. https://codereview.chromium.org/1144333007/diff/1/components/proximity_auth/ble/bluetooth_low_energy_connection_unittest.cc File components/proximity_auth/ble/bluetooth_low_energy_connection_unittest.cc (right): https://codereview.chromium.org/1144333007/diff/1/components/proximity_auth/ble/bluetooth_low_energy_connection_unittest.cc#newcode77 components/proximity_auth/ble/bluetooth_low_energy_connection_unittest.cc:77: // Exposing inherited protected methods ...
5 years, 6 months ago (2015-06-05 09:40:19 UTC) #3
sacomoto
https://codereview.chromium.org/1144333007/diff/1/components/proximity_auth/ble/bluetooth_low_energy_connection_unittest.cc File components/proximity_auth/ble/bluetooth_low_energy_connection_unittest.cc (right): https://codereview.chromium.org/1144333007/diff/1/components/proximity_auth/ble/bluetooth_low_energy_connection_unittest.cc#newcode77 components/proximity_auth/ble/bluetooth_low_energy_connection_unittest.cc:77: On 2015/06/05 09:40:19, msarda wrote: > // Exposing inherited ...
5 years, 6 months ago (2015-06-05 11:04:04 UTC) #4
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1144333007/60001
5 years, 6 months ago (2015-06-05 14:55:19 UTC) #7
commit-bot: I haz the power
Committed patchset #4 (id:60001)
5 years, 6 months ago (2015-06-05 15:37:30 UTC) #8
commit-bot: I haz the power
5 years, 6 months ago (2015-06-05 15:38:38 UTC) #9
Message was sent while issue was closed.
Patchset 4 (id:??) landed as
https://crrev.com/e5da7f28b633b5f05c3b99aa019d7da6b4ff1a0b
Cr-Commit-Position: refs/heads/master@{#333051}

Powered by Google App Engine
This is Rietveld 408576698