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

Issue 1132943002: bluetooth: Move mock creation out of BluetoothDispatcherHost to LayoutTestBluetoothAdapterProvider. (Closed)

Created:
5 years, 7 months ago by ortuno
Modified:
5 years, 7 months ago
CC:
chromium-reviews, darin-cc_chromium.org, jam, jochen+watch_chromium.org, mkwst+moarreviews-shell_chromium.org, mlamouri+watch-content_chromium.org, scheib+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@bluetooth-testing-layout-tests
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

bluetooth: Move mock creation out of BluetoothDispatcherHost to LayoutTestBluetoothAdapterProvider. This patch doesn't add any new tests. Split for easier reviewing. This is the last of two patches to remove testing from BluetoothDispatcherHost and BluetoothDispatcher: [1] http://crrev.com/1125133005 [2] This patch. BUG=436284 Committed: https://crrev.com/fd24faac014bc95571dbfb51bfd043c390dd6cd4 Cr-Commit-Position: refs/heads/master@{#330748}

Patch Set 1 : #

Total comments: 45

Patch Set 2 : Removed unused constants #

Patch Set 3 : Address @scheib comments. #

Total comments: 6

Patch Set 4 : Adding whitespace for easier readability. #

Patch Set 5 : Address scheib comments #

Total comments: 17

Patch Set 6 : Remove member variables. #

Total comments: 8

Patch Set 7 : Changed new'ed variables to scoped_ptr. #

Total comments: 2

Patch Set 8 : Change release() to pass() #

Patch Set 9 : Move testing out of browser context. #

Total comments: 2

Patch Set 10 : Update documentation. #

Total comments: 8

Patch Set 11 : Fixes based on comments #

Patch Set 12 : Add non const method #

Total comments: 4

Patch Set 13 : Address armansito's comments #

Patch Set 14 : Merged with previous patch #

Patch Set 15 : Fix API tests failing #

Unified diffs Side-by-side diffs Delta from patch set Stats (+280 lines, -76 lines) Patch
M content/browser/bluetooth/bluetooth_dispatcher_host.h View 1 2 3 4 5 6 7 8 2 chunks +5 lines, -5 lines 0 comments Download
M content/browser/bluetooth/bluetooth_dispatcher_host.cc View 1 2 3 4 5 6 7 8 9 10 4 chunks +20 lines, -64 lines 0 comments Download
M content/content_shell.gypi View 1 2 3 4 5 6 7 8 3 chunks +5 lines, -0 lines 0 comments Download
M content/public/test/layouttest_support.h View 1 2 3 4 5 6 7 8 2 chunks +6 lines, -1 line 0 comments Download
M content/shell/BUILD.gn View 1 2 3 4 5 6 7 8 3 chunks +5 lines, -0 lines 0 comments Download
A content/shell/browser/layout_test/layout_test_bluetooth_adapter_provider.h View 1 2 3 4 5 6 7 8 9 1 chunk +67 lines, -0 lines 0 comments Download
A content/shell/browser/layout_test/layout_test_bluetooth_adapter_provider.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +128 lines, -0 lines 0 comments Download
M content/shell/browser/layout_test/layout_test_message_filter.cc View 1 2 3 4 5 6 7 8 9 2 chunks +4 lines, -2 lines 0 comments Download
M content/test/DEPS View 1 2 3 4 5 6 7 8 1 chunk +1 line, -0 lines 0 comments Download
M content/test/layouttest_support.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +6 lines, -4 lines 0 comments Download
M device/bluetooth/test/mock_bluetooth_adapter.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 3 chunks +12 lines, -0 lines 0 comments Download
M device/bluetooth/test/mock_bluetooth_adapter.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +21 lines, -0 lines 0 comments Download

Messages

Total messages: 50 (19 generated)
scheib
https://codereview.chromium.org/1132943002/diff/100001/content/browser/bluetooth/bluetooth_dispatcher_host.cc File content/browser/bluetooth/bluetooth_dispatcher_host.cc (right): https://codereview.chromium.org/1132943002/diff/100001/content/browser/bluetooth/bluetooth_dispatcher_host.cc#newcode20 content/browser/bluetooth/bluetooth_dispatcher_host.cc:20: const uint32 kUnspecifiedDeviceClass = Delete constant here, it is ...
5 years, 7 months ago (2015-05-11 20:19:27 UTC) #7
scheib
https://codereview.chromium.org/1132943002/diff/100001/content/shell/browser/layout_test/layout_test_bluetooth_adapter_provider.cc File content/shell/browser/layout_test/layout_test_bluetooth_adapter_provider.cc (right): https://codereview.chromium.org/1132943002/diff/100001/content/shell/browser/layout_test/layout_test_bluetooth_adapter_provider.cc#newcode9 content/shell/browser/layout_test/layout_test_bluetooth_adapter_provider.cc:9: Add using statements to simplify code below, such as: ...
5 years, 7 months ago (2015-05-12 01:16:28 UTC) #8
ortuno
@scheib: Ready for review again. https://codereview.chromium.org/1132943002/diff/100001/content/browser/bluetooth/bluetooth_dispatcher_host.cc File content/browser/bluetooth/bluetooth_dispatcher_host.cc (right): https://codereview.chromium.org/1132943002/diff/100001/content/browser/bluetooth/bluetooth_dispatcher_host.cc#newcode112 content/browser/bluetooth/bluetooth_dispatcher_host.cc:112: browser_context_->GetBluetoothAdapterForTesting( On 2015/05/11 at ...
5 years, 7 months ago (2015-05-12 19:33:20 UTC) #10
scheib
LGTM, with small fixes: https://codereview.chromium.org/1132943002/diff/160001/content/shell/browser/layout_test/layout_test_bluetooth_adapter_provider.cc File content/shell/browser/layout_test/layout_test_bluetooth_adapter_provider.cc (right): https://codereview.chromium.org/1132943002/diff/160001/content/shell/browser/layout_test/layout_test_bluetooth_adapter_provider.cc#newcode48 content/shell/browser/layout_test/layout_test_bluetooth_adapter_provider.cc:48: callback.Run(NULL); We start off with ...
5 years, 7 months ago (2015-05-12 20:15:06 UTC) #11
ortuno
Thanks! https://codereview.chromium.org/1132943002/diff/160001/content/shell/browser/layout_test/layout_test_bluetooth_adapter_provider.cc File content/shell/browser/layout_test/layout_test_bluetooth_adapter_provider.cc (right): https://codereview.chromium.org/1132943002/diff/160001/content/shell/browser/layout_test/layout_test_bluetooth_adapter_provider.cc#newcode48 content/shell/browser/layout_test/layout_test_bluetooth_adapter_provider.cc:48: callback.Run(NULL); On 2015/05/12 at 20:15:06, scheib wrote: > ...
5 years, 7 months ago (2015-05-12 20:49:08 UTC) #12
Jeffrey Yasskin
In the change description, you should say "Move testing from BluetoothDispatcherHost to Xyz", not just ...
5 years, 7 months ago (2015-05-12 22:17:54 UTC) #14
Jeffrey Yasskin
https://codereview.chromium.org/1132943002/diff/100001/content/shell/browser/layout_test/layout_test_bluetooth_adapter_provider.cc File content/shell/browser/layout_test/layout_test_bluetooth_adapter_provider.cc (right): https://codereview.chromium.org/1132943002/diff/100001/content/shell/browser/layout_test/layout_test_bluetooth_adapter_provider.cc#newcode41 content/shell/browser/layout_test/layout_test_bluetooth_adapter_provider.cc:41: testing::NiceMock<MockBluetoothAdapter>* mock_adapter_ = On 2015/05/12 01:16:28, scheib wrote: > ...
5 years, 7 months ago (2015-05-12 22:37:49 UTC) #15
scheib
https://codereview.chromium.org/1132943002/diff/100001/content/shell/browser/layout_test/layout_test_bluetooth_adapter_provider.cc File content/shell/browser/layout_test/layout_test_bluetooth_adapter_provider.cc (right): https://codereview.chromium.org/1132943002/diff/100001/content/shell/browser/layout_test/layout_test_bluetooth_adapter_provider.cc#newcode41 content/shell/browser/layout_test/layout_test_bluetooth_adapter_provider.cc:41: testing::NiceMock<MockBluetoothAdapter>* mock_adapter_ = On 2015/05/12 22:37:49, Jeffrey Yasskin wrote: ...
5 years, 7 months ago (2015-05-13 04:11:05 UTC) #16
ortuno
@jyassking: Ready for review again. https://codereview.chromium.org/1132943002/diff/200001/content/content_shell.gypi File content/content_shell.gypi (right): https://codereview.chromium.org/1132943002/diff/200001/content/content_shell.gypi#newcode54 content/content_shell.gypi:54: '../device/bluetooth/bluetooth.gyp:device_bluetooth_mocks', On 2015/05/12 at ...
5 years, 7 months ago (2015-05-13 17:14:50 UTC) #18
Jeffrey Yasskin
https://codereview.chromium.org/1132943002/diff/100001/content/shell/browser/layout_test/layout_test_bluetooth_adapter_provider.cc File content/shell/browser/layout_test/layout_test_bluetooth_adapter_provider.cc (right): https://codereview.chromium.org/1132943002/diff/100001/content/shell/browser/layout_test/layout_test_bluetooth_adapter_provider.cc#newcode41 content/shell/browser/layout_test/layout_test_bluetooth_adapter_provider.cc:41: testing::NiceMock<MockBluetoothAdapter>* mock_adapter_ = On 2015/05/13 04:11:05, scheib wrote: > ...
5 years, 7 months ago (2015-05-13 19:40:51 UTC) #19
ortuno
@jyasskin: Ready for review again! https://codereview.chromium.org/1132943002/diff/270001/content/shell/browser/layout_test/layout_test_bluetooth_adapter_provider.cc File content/shell/browser/layout_test/layout_test_bluetooth_adapter_provider.cc (right): https://codereview.chromium.org/1132943002/diff/270001/content/shell/browser/layout_test/layout_test_bluetooth_adapter_provider.cc#newcode58 content/shell/browser/layout_test/layout_test_bluetooth_adapter_provider.cc:58: NiceMock<MockBluetoothAdapter>* adapter = On ...
5 years, 7 months ago (2015-05-13 20:59:31 UTC) #23
ortuno
@jyasskin: Ready for review again!
5 years, 7 months ago (2015-05-13 20:59:32 UTC) #24
Jeffrey Yasskin
Thanks, LGTM! https://codereview.chromium.org/1132943002/diff/310001/device/bluetooth/test/mock_bluetooth_adapter.cc File device/bluetooth/test/mock_bluetooth_adapter.cc (right): https://codereview.chromium.org/1132943002/diff/310001/device/bluetooth/test/mock_bluetooth_adapter.cc#newcode57 device/bluetooth/test/mock_bluetooth_adapter.cc:57: mock_devices_.push_back(mock_device.release()); You could use .Pass() here, but ...
5 years, 7 months ago (2015-05-13 21:44:37 UTC) #25
ortuno
Thanks! https://codereview.chromium.org/1132943002/diff/310001/device/bluetooth/test/mock_bluetooth_adapter.cc File device/bluetooth/test/mock_bluetooth_adapter.cc (right): https://codereview.chromium.org/1132943002/diff/310001/device/bluetooth/test/mock_bluetooth_adapter.cc#newcode57 device/bluetooth/test/mock_bluetooth_adapter.cc:57: mock_devices_.push_back(mock_device.release()); On 2015/05/13 at 21:44:36, Jeffrey Yasskin wrote: ...
5 years, 7 months ago (2015-05-13 22:12:35 UTC) #26
ortuno
@jam: PTAL
5 years, 7 months ago (2015-05-14 17:41:32 UTC) #28
ortuno
@jyasskin: We changed the approach in previous patches so I had to do some refactoring. ...
5 years, 7 months ago (2015-05-15 23:29:06 UTC) #29
Jeffrey Yasskin
Still lgtm. https://codereview.chromium.org/1132943002/diff/350001/content/shell/browser/layout_test/layout_test_bluetooth_adapter_provider.h File content/shell/browser/layout_test/layout_test_bluetooth_adapter_provider.h (right): https://codereview.chromium.org/1132943002/diff/350001/content/shell/browser/layout_test/layout_test_bluetooth_adapter_provider.h#newcode21 content/shell/browser/layout_test/layout_test_bluetooth_adapter_provider.h:21: static scoped_refptr<device::BluetoothAdapter> GetBluetoothAdapter( Yay for fewer callbacks!
5 years, 7 months ago (2015-05-15 23:38:01 UTC) #30
Jeffrey Yasskin
Still lgtm.
5 years, 7 months ago (2015-05-15 23:38:05 UTC) #31
ortuno
@scheib: PTAL https://codereview.chromium.org/1132943002/diff/350001/content/shell/browser/layout_test/layout_test_bluetooth_adapter_provider.h File content/shell/browser/layout_test/layout_test_bluetooth_adapter_provider.h (right): https://codereview.chromium.org/1132943002/diff/350001/content/shell/browser/layout_test/layout_test_bluetooth_adapter_provider.h#newcode21 content/shell/browser/layout_test/layout_test_bluetooth_adapter_provider.h:21: static scoped_refptr<device::BluetoothAdapter> GetBluetoothAdapter( On 2015/05/15 at 23:38:01, ...
5 years, 7 months ago (2015-05-15 23:53:36 UTC) #32
scheib
LGTM with small fixes: https://codereview.chromium.org/1132943002/diff/370001/content/browser/bluetooth/bluetooth_dispatcher_host.cc File content/browser/bluetooth/bluetooth_dispatcher_host.cc (right): https://codereview.chromium.org/1132943002/diff/370001/content/browser/bluetooth/bluetooth_dispatcher_host.cc#newcode102 content/browser/bluetooth/bluetooth_dispatcher_host.cc:102: void BluetoothDispatcherHost::SetBluetoothAdapterForTesting( Move to match ...
5 years, 7 months ago (2015-05-16 02:39:14 UTC) #33
jam
lgtm
5 years, 7 months ago (2015-05-18 15:39:22 UTC) #34
scheib
https://codereview.chromium.org/1132943002/diff/370001/content/browser/bluetooth/bluetooth_dispatcher_host.h File content/browser/bluetooth/bluetooth_dispatcher_host.h (right): https://codereview.chromium.org/1132943002/diff/370001/content/browser/bluetooth/bluetooth_dispatcher_host.h#newcode37 content/browser/bluetooth/bluetooth_dispatcher_host.h:37: void SetBluetoothAdapterForTesting( On 2015/05/16 02:39:14, scheib wrote: > Make ...
5 years, 7 months ago (2015-05-18 16:43:46 UTC) #35
ortuno
https://codereview.chromium.org/1132943002/diff/370001/content/browser/bluetooth/bluetooth_dispatcher_host.cc File content/browser/bluetooth/bluetooth_dispatcher_host.cc (right): https://codereview.chromium.org/1132943002/diff/370001/content/browser/bluetooth/bluetooth_dispatcher_host.cc#newcode102 content/browser/bluetooth/bluetooth_dispatcher_host.cc:102: void BluetoothDispatcherHost::SetBluetoothAdapterForTesting( On 2015/05/16 at 02:39:14, scheib wrote: > ...
5 years, 7 months ago (2015-05-18 17:41:56 UTC) #36
ortuno
@armansito: PTAL at new DEPS and mock_bluetooth_adapter.h/cc. This change adds a new method to add ...
5 years, 7 months ago (2015-05-18 17:44:49 UTC) #38
armansito
lgtm with nits https://codereview.chromium.org/1132943002/diff/410001/device/bluetooth/test/mock_bluetooth_adapter.cc File device/bluetooth/test/mock_bluetooth_adapter.cc (right): https://codereview.chromium.org/1132943002/diff/410001/device/bluetooth/test/mock_bluetooth_adapter.cc#newcode57 device/bluetooth/test/mock_bluetooth_adapter.cc:57: it != mock_devices_.end(); ++it) { nit: ...
5 years, 7 months ago (2015-05-19 20:18:33 UTC) #39
ortuno
Thanks! https://codereview.chromium.org/1132943002/diff/410001/device/bluetooth/test/mock_bluetooth_adapter.cc File device/bluetooth/test/mock_bluetooth_adapter.cc (right): https://codereview.chromium.org/1132943002/diff/410001/device/bluetooth/test/mock_bluetooth_adapter.cc#newcode57 device/bluetooth/test/mock_bluetooth_adapter.cc:57: it != mock_devices_.end(); ++it) { On 2015/05/19 at ...
5 years, 7 months ago (2015-05-19 22:25:01 UTC) #40
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1132943002/430001
5 years, 7 months ago (2015-05-19 23:03:47 UTC) #43
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_gn_chromeos_rel on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_gn_chromeos_rel/builds/39284) linux_chromium_gn_dbg on tryserver.chromium.linux (JOB_FAILED, ...
5 years, 7 months ago (2015-05-20 00:25:04 UTC) #45
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1132943002/470001
5 years, 7 months ago (2015-05-20 16:29:25 UTC) #48
commit-bot: I haz the power
Committed patchset #15 (id:470001)
5 years, 7 months ago (2015-05-20 16:34:46 UTC) #49
commit-bot: I haz the power
5 years, 7 months ago (2015-05-20 16:35:30 UTC) #50
Message was sent while issue was closed.
Patchset 15 (id:??) landed as
https://crrev.com/fd24faac014bc95571dbfb51bfd043c390dd6cd4
Cr-Commit-Position: refs/heads/master@{#330748}

Powered by Google App Engine
This is Rietveld 408576698