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

Issue 1138913006: bluetooth: Refactor LayoutTestBluetoothAdapterProvider. (Closed)

Created:
5 years, 7 months ago by ortuno
Modified:
5 years, 7 months ago
Reviewers:
Jeffrey Yasskin, scheib
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-remove-mocking
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

bluetooth: Refactor LayoutTestBluetoothAdapterProvider. This CL removes all Invoke() calls and uses ACTION_TEMPLATE instead. This makes the code easier to read as now the values passed to the callbacks are no longer hidden inside other functions. Also change the definition of GetDevices to call adapter->GetConstMockDevices directly. This allows us to use the EmptyAdapter as a base adapter on which we can build other adapters. BUG=436284 Committed: https://crrev.com/129450531e3f0c715c669764250c609777129ea0 Cr-Commit-Position: refs/heads/master@{#330760}

Patch Set 1 : #

Total comments: 8

Patch Set 2 : Remove ACTIONs from content namespace #

Patch Set 3 : Use EXPECT_CALL...WillOnce instead of ON_CALL #

Total comments: 1

Patch Set 4 : Use lambdas for creating a discovery session. #

Total comments: 12

Patch Set 5 : Clean up #

Patch Set 6 : Address scheib's comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+38 lines, -38 lines) Patch
M content/shell/browser/layout_test/layout_test_bluetooth_adapter_provider.h View 1 2 3 4 2 chunks +9 lines, -13 lines 0 comments Download
M content/shell/browser/layout_test/layout_test_bluetooth_adapter_provider.cc View 1 2 3 4 5 4 chunks +29 lines, -25 lines 0 comments Download

Messages

Total messages: 24 (8 generated)
ortuno
@jyasskin: I'm writing some tests for connectGATT and refactoring seemed big enough to put it ...
5 years, 7 months ago (2015-05-18 22:35:23 UTC) #3
Jeffrey Yasskin
https://codereview.chromium.org/1138913006/diff/20001/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/1138913006/diff/20001/content/shell/browser/layout_test/layout_test_bluetooth_adapter_provider.cc#newcode62 content/shell/browser/layout_test/layout_test_bluetooth_adapter_provider.cc:62: discovery_session.release())); This will crash if StartDiscoverySession is called more ...
5 years, 7 months ago (2015-05-19 01:09:01 UTC) #4
ortuno
Ready for review again! https://codereview.chromium.org/1138913006/diff/20001/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/1138913006/diff/20001/content/shell/browser/layout_test/layout_test_bluetooth_adapter_provider.cc#newcode62 content/shell/browser/layout_test/layout_test_bluetooth_adapter_provider.cc:62: discovery_session.release())); On 2015/05/19 at 01:09:01, ...
5 years, 7 months ago (2015-05-19 01:51:54 UTC) #5
Jeffrey Yasskin
https://codereview.chromium.org/1138913006/diff/20001/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/1138913006/diff/20001/content/shell/browser/layout_test/layout_test_bluetooth_adapter_provider.cc#newcode62 content/shell/browser/layout_test/layout_test_bluetooth_adapter_provider.cc:62: discovery_session.release())); On 2015/05/19 01:51:53, ortuno wrote: > On 2015/05/19 ...
5 years, 7 months ago (2015-05-19 17:14:00 UTC) #6
ortuno
https://codereview.chromium.org/1138913006/diff/20001/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/1138913006/diff/20001/content/shell/browser/layout_test/layout_test_bluetooth_adapter_provider.cc#newcode62 content/shell/browser/layout_test/layout_test_bluetooth_adapter_provider.cc:62: discovery_session.release())); On 2015/05/19 at 17:13:59, Jeffrey Yasskin wrote: > ...
5 years, 7 months ago (2015-05-19 19:51:18 UTC) #7
Jeffrey Yasskin
LGTM with the formatting fixed. The other note is something to think about doing, but ...
5 years, 7 months ago (2015-05-19 20:47:49 UTC) #8
ortuno
https://codereview.chromium.org/1138913006/diff/20001/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/1138913006/diff/20001/content/shell/browser/layout_test/layout_test_bluetooth_adapter_provider.cc#newcode62 content/shell/browser/layout_test/layout_test_bluetooth_adapter_provider.cc:62: discovery_session.release())); On 2015/05/19 at 20:47:49, Jeffrey Yasskin wrote: > ...
5 years, 7 months ago (2015-05-19 23:03:35 UTC) #10
ortuno
@scheib: PTAL
5 years, 7 months ago (2015-05-19 23:07:38 UTC) #12
Jeffrey Yasskin
lgtm https://codereview.chromium.org/1138913006/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/1138913006/diff/100001/content/shell/browser/layout_test/layout_test_bluetooth_adapter_provider.cc#newcode37 content/shell/browser/layout_test/layout_test_bluetooth_adapter_provider.cc:37: // of |func| as an argument. This is ...
5 years, 7 months ago (2015-05-20 00:27:28 UTC) #13
scheib
https://codereview.chromium.org/1138913006/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/1138913006/diff/100001/content/shell/browser/layout_test/layout_test_bluetooth_adapter_provider.cc#newcode33 content/shell/browser/layout_test/layout_test_bluetooth_adapter_provider.cc:33: return ::std::tr1::get<k>(args).Run(); First time I've seen "::std::tr1". Is that ...
5 years, 7 months ago (2015-05-20 04:17:06 UTC) #16
ortuno
https://codereview.chromium.org/1138913006/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/1138913006/diff/100001/content/shell/browser/layout_test/layout_test_bluetooth_adapter_provider.cc#newcode33 content/shell/browser/layout_test/layout_test_bluetooth_adapter_provider.cc:33: return ::std::tr1::get<k>(args).Run(); On 2015/05/20 at 04:17:06, scheib wrote: > ...
5 years, 7 months ago (2015-05-20 16:44:04 UTC) #17
scheib
LGTM with: - A bug number is description. - A comment added: https://codereview.chromium.org/1138913006/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 ...
5 years, 7 months ago (2015-05-20 16:57:49 UTC) #18
scheib
> Not as done as I think you think I thought you would think it ...
5 years, 7 months ago (2015-05-20 16:59:14 UTC) #19
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1138913006/180001
5 years, 7 months ago (2015-05-20 17:26:07 UTC) #22
commit-bot: I haz the power
Committed patchset #6 (id:180001)
5 years, 7 months ago (2015-05-20 17:31:15 UTC) #23
commit-bot: I haz the power
5 years, 7 months ago (2015-05-20 17:32:54 UTC) #24
Message was sent while issue was closed.
Patchset 6 (id:??) landed as
https://crrev.com/129450531e3f0c715c669764250c609777129ea0
Cr-Commit-Position: refs/heads/master@{#330760}

Powered by Google App Engine
This is Rietveld 408576698