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

Issue 441103002: Tests for the Copresence API. (Closed)

Created:
6 years, 4 months ago by Charlie
Modified:
6 years, 4 months ago
CC:
chromium-reviews, chromium-apps-reviews_chromium.org, extensions-reviews_chromium.org, xiyuan, Daniel Erat
Base URL:
https://chromium.googlesource.com/chromium/src.git@api
Project:
chromium
Visibility:
Public.

Description

This CL adds tests for the Chrome copresence API. These are the tests that go with: https://codereview.chromium.org/444513005/ R=rkc@chromium.org,kalman@chromium.org BUG=365493 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=290183

Patch Set 1 #

Patch Set 2 : Updating to the latest API #

Patch Set 3 : Fixing tests for the latest API. #

Total comments: 22

Patch Set 4 : #

Total comments: 2

Patch Set 5 : "Assertions" cleanup #

Total comments: 19

Patch Set 6 : Small fixes #

Patch Set 7 : Merging with HEAD #

Patch Set 8 : Refactoring and renaming CopresenceClient #

Patch Set 9 : Fixing build files #

Patch Set 10 : Rewrite #

Total comments: 2

Patch Set 11 : Moving initialization to SetUpOnMainThread() #

Total comments: 10

Patch Set 12 : Converting to unittests #

Patch Set 13 : Merging to head #

Patch Set 14 : Updating comments #

Patch Set 15 : Fixing tests #

Total comments: 2

Patch Set 16 : Renaming to simply CopresenceDelegate #

Unified diffs Side-by-side diffs Delta from patch set Stats (+489 lines, -294 lines) Patch
M chrome/browser/extensions/api/copresence/copresence_api.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 4 chunks +12 lines, -8 lines 0 comments Download
M chrome/browser/extensions/api/copresence/copresence_api.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 5 chunks +14 lines, -9 lines 0 comments Download
A chrome/browser/extensions/api/copresence/copresence_api_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +266 lines, -0 lines 0 comments Download
M chrome/browser/extensions/api/copresence/copresence_translations.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +1 line, -1 line 0 comments Download
M chrome/chrome_tests_unit.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +1 line, -0 lines 0 comments Download
M components/copresence.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 2 chunks +4 lines, -3 lines 0 comments Download
M components/copresence/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 2 chunks +4 lines, -3 lines 0 comments Download
M components/copresence/copresence_client.cc View 1 2 3 4 5 6 7 1 chunk +0 lines, -103 lines 0 comments Download
A components/copresence/copresence_manager.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +39 lines, -0 lines 0 comments Download
A components/copresence/copresence_manager_impl.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +71 lines, -0 lines 0 comments Download
A + components/copresence/copresence_manager_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 4 chunks +20 lines, -28 lines 0 comments Download
M components/copresence/handlers/directive_handler.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +1 line, -1 line 0 comments Download
M components/copresence/public/copresence_client.h View 1 2 3 4 5 6 7 1 chunk +0 lines, -78 lines 0 comments Download
D components/copresence/public/copresence_client_delegate.h View 1 2 3 4 5 6 7 8 9 1 chunk +0 lines, -48 lines 0 comments Download
A + components/copresence/public/copresence_delegate.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 3 chunks +4 lines, -4 lines 0 comments Download
A components/copresence/public/copresence_manager.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +44 lines, -0 lines 0 comments Download
M components/copresence/rpc/rpc_handler.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 4 chunks +4 lines, -4 lines 0 comments Download
M components/copresence/rpc/rpc_handler.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 2 chunks +2 lines, -2 lines 0 comments Download
M components/copresence/rpc/rpc_handler_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 2 chunks +2 lines, -2 lines 0 comments Download

Messages

Total messages: 70 (0 generated)
Charlie
6 years, 4 months ago (2014-08-06 20:22:33 UTC) #1
not at google - send to devlin
https://codereview.chromium.org/441103002/diff/40001/chrome/browser/extensions/api/copresence/copresence_apitest.cc File chrome/browser/extensions/api/copresence/copresence_apitest.cc (right): https://codereview.chromium.org/441103002/diff/40001/chrome/browser/extensions/api/copresence/copresence_apitest.cc#newcode16 chrome/browser/extensions/api/copresence/copresence_apitest.cc:16: class CopresenceApiTest : public ExtensionApiTest { a pattern I've ...
6 years, 4 months ago (2014-08-06 21:45:27 UTC) #2
Charlie
Thanks, I'm working on your comments. In the meantime please clarify as requested. https://codereview.chromium.org/441103002/diff/40001/components/copresence/public/copresence_client.h File ...
6 years, 4 months ago (2014-08-06 21:54:41 UTC) #3
not at google - send to devlin
https://codereview.chromium.org/441103002/diff/40001/components/copresence/public/copresence_client.h File components/copresence/public/copresence_client.h (right): https://codereview.chromium.org/441103002/diff/40001/components/copresence/public/copresence_client.h#newcode48 components/copresence/public/copresence_client.h:48: virtual void Initialize(CopresenceClientDelegate* delegate); On 2014/08/06 21:54:41, Charlie wrote: ...
6 years, 4 months ago (2014-08-06 22:02:00 UTC) #4
Charlie
On 2014/08/06 22:02:00, kalman wrote: > https://codereview.chromium.org/441103002/diff/40001/components/copresence/public/copresence_client.h > File components/copresence/public/copresence_client.h (right): > > https://codereview.chromium.org/441103002/diff/40001/components/copresence/public/copresence_client.h#newcode48 > ...
6 years, 4 months ago (2014-08-06 22:16:00 UTC) #5
not at google - send to devlin
On 2014/08/06 22:16:00, Charlie wrote: > On 2014/08/06 22:02:00, kalman wrote: > > > https://codereview.chromium.org/441103002/diff/40001/components/copresence/public/copresence_client.h ...
6 years, 4 months ago (2014-08-06 22:19:15 UTC) #6
Charlie
On 2014/08/06 22:19:15, kalman wrote: > On 2014/08/06 22:16:00, Charlie wrote: > > On 2014/08/06 ...
6 years, 4 months ago (2014-08-06 22:22:00 UTC) #7
not at google - send to devlin
interesting. yeah - the guide recommends against Init() if possible :)
6 years, 4 months ago (2014-08-06 22:26:01 UTC) #8
Charlie
On 2014/08/06 22:26:01, kalman wrote: > interesting. yeah - the guide recommends against Init() if ...
6 years, 4 months ago (2014-08-06 22:35:01 UTC) #9
rkc
https://codereview.chromium.org/441103002/diff/40001/chrome/browser/extensions/api/copresence/copresence_apitest.cc File chrome/browser/extensions/api/copresence/copresence_apitest.cc (right): https://codereview.chromium.org/441103002/diff/40001/chrome/browser/extensions/api/copresence/copresence_apitest.cc#newcode34 chrome/browser/extensions/api/copresence/copresence_apitest.cc:34: On 2014/08/06 21:45:27, kalman wrote: > if possible a ...
6 years, 4 months ago (2014-08-07 08:56:58 UTC) #10
not at google - send to devlin
https://codereview.chromium.org/441103002/diff/40001/chrome/browser/extensions/api/copresence/copresence_apitest.cc File chrome/browser/extensions/api/copresence/copresence_apitest.cc (right): https://codereview.chromium.org/441103002/diff/40001/chrome/browser/extensions/api/copresence/copresence_apitest.cc#newcode34 chrome/browser/extensions/api/copresence/copresence_apitest.cc:34: On 2014/08/07 08:56:57, Rahul Chaturvedi wrote: > On 2014/08/06 ...
6 years, 4 months ago (2014-08-07 15:34:25 UTC) #11
not at google - send to devlin
btw - and this is a much more significant change - given there is no ...
6 years, 4 months ago (2014-08-07 15:36:55 UTC) #12
Charlie
Added a TODO for switching to extension unittests. Is that ok for now? We'd really ...
6 years, 4 months ago (2014-08-07 22:24:16 UTC) #13
not at google - send to devlin
this is really hard on me reviewing 2 separate CLs which look similar and are ...
6 years, 4 months ago (2014-08-07 22:36:40 UTC) #14
Charlie
On 2014/08/07 22:36:40, kalman wrote: > this is really hard on me reviewing 2 separate ...
6 years, 4 months ago (2014-08-07 23:08:52 UTC) #15
not at google - send to devlin
> > > Added a TODO for switching to extension unittests. > > > > ...
6 years, 4 months ago (2014-08-07 23:19:06 UTC) #16
not at google - send to devlin
> > Switching to a Create() method per the CL-level thread. In order for subclassing ...
6 years, 4 months ago (2014-08-07 23:20:19 UTC) #17
not at google - send to devlin
nitty things; what does this look like after the implementation patch lands? i've lost track ...
6 years, 4 months ago (2014-08-07 23:21:13 UTC) #18
rkc
On 2014/08/07 23:21:13, kalman wrote: > nitty things; what does this look like after the ...
6 years, 4 months ago (2014-08-07 23:22:23 UTC) #19
Charlie
On 2014/08/07 23:20:19, kalman wrote: > > > > Switching to a Create() method per ...
6 years, 4 months ago (2014-08-07 23:37:43 UTC) #20
Charlie
https://codereview.chromium.org/441103002/diff/80001/chrome/browser/extensions/api/copresence/copresence_apitest.cc File chrome/browser/extensions/api/copresence/copresence_apitest.cc (right): https://codereview.chromium.org/441103002/diff/80001/chrome/browser/extensions/api/copresence/copresence_apitest.cc#newcode26 chrome/browser/extensions/api/copresence/copresence_apitest.cc:26: } else { On 2014/08/07 23:21:12, kalman wrote: > ...
6 years, 4 months ago (2014-08-07 23:52:25 UTC) #21
not at google - send to devlin
On 2014/08/07 23:37:43, Charlie wrote: > On 2014/08/07 23:20:19, kalman wrote: > > > > ...
6 years, 4 months ago (2014-08-07 23:53:46 UTC) #22
not at google - send to devlin
https://codereview.chromium.org/441103002/diff/80001/components/copresence/copresence_client.cc File components/copresence/copresence_client.cc (right): https://codereview.chromium.org/441103002/diff/80001/components/copresence/copresence_client.cc#newcode31 components/copresence/copresence_client.cc:31: if (rpc_handler_.get()) On 2014/08/07 23:52:25, Charlie wrote: > On ...
6 years, 4 months ago (2014-08-07 23:54:24 UTC) #23
rkc
https://codereview.chromium.org/441103002/diff/80001/components/copresence/copresence_client.cc File components/copresence/copresence_client.cc (right): https://codereview.chromium.org/441103002/diff/80001/components/copresence/copresence_client.cc#newcode29 components/copresence/copresence_client.cc:29: if (delegate_ && delegate_->GetWhispernetClient()) On 2014/08/07 23:52:25, Charlie wrote: ...
6 years, 4 months ago (2014-08-08 00:05:35 UTC) #24
rkc
https://codereview.chromium.org/441103002/diff/80001/components/copresence/copresence_client.cc File components/copresence/copresence_client.cc (right): https://codereview.chromium.org/441103002/diff/80001/components/copresence/copresence_client.cc#newcode31 components/copresence/copresence_client.cc:31: if (rpc_handler_.get()) On 2014/08/07 23:54:24, kalman wrote: > On ...
6 years, 4 months ago (2014-08-08 00:37:01 UTC) #25
not at google - send to devlin
https://codereview.chromium.org/441103002/diff/80001/components/copresence/copresence_client.cc File components/copresence/copresence_client.cc (right): https://codereview.chromium.org/441103002/diff/80001/components/copresence/copresence_client.cc#newcode31 components/copresence/copresence_client.cc:31: if (rpc_handler_.get()) On 2014/08/08 00:37:00, Rahul Chaturvedi wrote: > ...
6 years, 4 months ago (2014-08-08 13:48:35 UTC) #26
miket_OOO
Why are tests landing separately from the code being tested?
6 years, 4 months ago (2014-08-08 17:35:51 UTC) #27
Charlie
Code not updated yet, but I wanted to close out the discussion as best I ...
6 years, 4 months ago (2014-08-08 18:25:50 UTC) #28
rkc
On 2014/08/08 17:35:51, miket wrote: > Why are tests landing separately from the code being ...
6 years, 4 months ago (2014-08-08 18:57:11 UTC) #29
not at google - send to devlin
https://codereview.chromium.org/441103002/diff/80001/components/copresence/copresence_client.cc File components/copresence/copresence_client.cc (right): https://codereview.chromium.org/441103002/diff/80001/components/copresence/copresence_client.cc#newcode31 components/copresence/copresence_client.cc:31: if (rpc_handler_.get()) > > IIUC the change to the ...
6 years, 4 months ago (2014-08-08 19:42:04 UTC) #30
Charlie
On 2014/08/08 19:42:04, kalman wrote: > https://codereview.chromium.org/441103002/diff/80001/components/copresence/copresence_client.cc > File components/copresence/copresence_client.cc (right): > > https://codereview.chromium.org/441103002/diff/80001/components/copresence/copresence_client.cc#newcode31 > ...
6 years, 4 months ago (2014-08-08 19:52:01 UTC) #31
not at google - send to devlin
> Yes and no. The way I'm thinking of it, CopresenceClient is the C++ API, ...
6 years, 4 months ago (2014-08-08 19:54:19 UTC) #32
Charlie
Ok, I separated the CopresenceClient interface out. I also renamed it to CopresenceManager as blundell@ ...
6 years, 4 months ago (2014-08-13 19:13:15 UTC) #33
not at google - send to devlin
> I think I can change this to extension function unittests today, but I'm not ...
6 years, 4 months ago (2014-08-13 19:37:08 UTC) #34
Charlie
On 2014/08/13 19:37:08, kalman wrote: > > I think I can change this to extension ...
6 years, 4 months ago (2014-08-13 20:21:48 UTC) #35
not at google - send to devlin
There are a bunch of examples, and I don't know what the best would be ...
6 years, 4 months ago (2014-08-13 20:26:46 UTC) #36
Charlie
On 2014/08/13 20:26:46, kalman wrote: > There are a bunch of examples, and I don't ...
6 years, 4 months ago (2014-08-13 20:43:14 UTC) #37
not at google - send to devlin
> I guess what I'm asking boils down to two things: > > 1. What's ...
6 years, 4 months ago (2014-08-13 20:44:56 UTC) #38
Charlie
On 2014/08/13 20:43:14, Charlie wrote: > On 2014/08/13 20:26:46, kalman wrote: > > There are ...
6 years, 4 months ago (2014-08-13 20:44:56 UTC) #39
not at google - send to devlin
On 2014/08/13 20:44:56, kalman wrote: > > I guess what I'm asking boils down to ...
6 years, 4 months ago (2014-08-13 20:45:37 UTC) #40
Charlie
Ok, here is a rewrite basically from the ground up. I ended up with a ...
6 years, 4 months ago (2014-08-15 20:37:04 UTC) #41
not at google - send to devlin
On 2014/08/15 20:37:04, Charlie wrote: > Ok, here is a rewrite basically from the ground ...
6 years, 4 months ago (2014-08-15 20:40:25 UTC) #42
not at google - send to devlin
On 2014/08/15 20:40:25, kalman wrote: > On 2014/08/15 20:37:04, Charlie wrote: > > Ok, here ...
6 years, 4 months ago (2014-08-15 20:40:33 UTC) #43
xiyuan
https://codereview.chromium.org/441103002/diff/180001/chrome/browser/extensions/api/copresence/copresence_apitest.cc File chrome/browser/extensions/api/copresence/copresence_apitest.cc (right): https://codereview.chromium.org/441103002/diff/180001/chrome/browser/extensions/api/copresence/copresence_apitest.cc#newcode120 chrome/browser/extensions/api/copresence/copresence_apitest.cc:120: CopresenceService::GetFactoryInstance()->Get(profile()); You cannot do this in test's ctor. It ...
6 years, 4 months ago (2014-08-15 20:48:35 UTC) #44
chromium-reviews
Isn't this a lot of (undocumented) boilerplate just to call some extension functions though? Why ...
6 years, 4 months ago (2014-08-15 20:48:41 UTC) #45
Charlie
OK much better. But we have a remaining problem. The RunFunction* utilities accept arguments as ...
6 years, 4 months ago (2014-08-15 21:25:39 UTC) #46
not at google - send to devlin
On 2014/08/15 20:48:41, chromium-reviews wrote: > Isn't this a lot of (undocumented) boilerplate just to ...
6 years, 4 months ago (2014-08-15 21:43:28 UTC) #47
Charlie
On 2014/08/15 21:43:28, kalman wrote: > On 2014/08/15 20:48:41, chromium-reviews wrote: > > Isn't this ...
6 years, 4 months ago (2014-08-15 21:49:27 UTC) #48
not at google - send to devlin
Some quick higher level comments, haven't look at the specifics of the test. Thanks for ...
6 years, 4 months ago (2014-08-15 22:17:03 UTC) #49
Charlie
https://codereview.chromium.org/441103002/diff/200001/chrome/browser/extensions/api/copresence/copresence_api.cc File chrome/browser/extensions/api/copresence/copresence_api.cc (right): https://codereview.chromium.org/441103002/diff/200001/chrome/browser/extensions/api/copresence/copresence_api.cc#newcode126 chrome/browser/extensions/api/copresence/copresence_api.cc:126: DCHECK(ExtensionsBrowserClient::Get()); On 2014/08/15 22:17:02, kalman wrote: > Why this? ...
6 years, 4 months ago (2014-08-15 23:46:40 UTC) #50
not at google - send to devlin
The tests generally lgtm, thanks again for going through that. Glad they're running much faster, ...
6 years, 4 months ago (2014-08-15 23:54:40 UTC) #51
xiyuan
copresence LGTM
6 years, 4 months ago (2014-08-16 04:45:51 UTC) #52
Charlie
The CQ bit was checked by ckehoe@chromium.org
6 years, 4 months ago (2014-08-16 16:17:48 UTC) #53
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/ckehoe@chromium.org/441103002/240001
6 years, 4 months ago (2014-08-16 16:18:37 UTC) #54
Charlie
The CQ bit was unchecked by ckehoe@chromium.org
6 years, 4 months ago (2014-08-16 16:19:06 UTC) #55
Charlie
The CQ bit was checked by ckehoe@chromium.org
6 years, 4 months ago (2014-08-16 16:30:23 UTC) #56
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/ckehoe@chromium.org/441103002/280001
6 years, 4 months ago (2014-08-16 16:30:39 UTC) #57
rkc
https://codereview.chromium.org/441103002/diff/280001/components/copresence/public/copresence_manager_delegate.h File components/copresence/public/copresence_manager_delegate.h (right): https://codereview.chromium.org/441103002/diff/280001/components/copresence/public/copresence_manager_delegate.h#newcode28 components/copresence/public/copresence_manager_delegate.h:28: class CopresenceManagerDelegate { (Doesn't have to be this CL) ...
6 years, 4 months ago (2014-08-16 16:52:21 UTC) #58
commit-bot: I haz the power
FYI, CQ is re-trying this CL (attempt #1). The failing builders are: mac_gpu_retina_triggered_tests on tryserver.chromium.gpu ...
6 years, 4 months ago (2014-08-16 17:34:36 UTC) #59
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 4 months ago (2014-08-16 17:39:13 UTC) #60
commit-bot: I haz the power
Try jobs failed on following builders: mac_chromium_compile_dbg on tryserver.chromium.mac (http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_compile_dbg/builds/6700)
6 years, 4 months ago (2014-08-16 17:39:14 UTC) #61
Charlie
https://codereview.chromium.org/441103002/diff/280001/components/copresence/public/copresence_manager_delegate.h File components/copresence/public/copresence_manager_delegate.h (right): https://codereview.chromium.org/441103002/diff/280001/components/copresence/public/copresence_manager_delegate.h#newcode28 components/copresence/public/copresence_manager_delegate.h:28: class CopresenceManagerDelegate { On 2014/08/16 16:52:21, Rahul Chaturvedi wrote: ...
6 years, 4 months ago (2014-08-16 23:58:27 UTC) #62
Charlie
The CQ bit was checked by ckehoe@chromium.org
6 years, 4 months ago (2014-08-17 00:00:39 UTC) #63
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/ckehoe@chromium.org/441103002/300001
6 years, 4 months ago (2014-08-17 00:01:06 UTC) #64
commit-bot: I haz the power
FYI, CQ is re-trying this CL (attempt #1). The failing builders are: mac_chromium_rel_swarming on tryserver.chromium.mac ...
6 years, 4 months ago (2014-08-17 06:47:22 UTC) #65
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 4 months ago (2014-08-17 07:41:48 UTC) #66
commit-bot: I haz the power
Try jobs failed on following builders: mac_chromium_rel_swarming on tryserver.chromium.mac (http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_rel_swarming/builds/4061)
6 years, 4 months ago (2014-08-17 07:41:50 UTC) #67
rkc
The CQ bit was checked by rkc@chromium.org
6 years, 4 months ago (2014-08-17 15:17:19 UTC) #68
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/ckehoe@chromium.org/441103002/300001
6 years, 4 months ago (2014-08-17 15:18:07 UTC) #69
commit-bot: I haz the power
6 years, 4 months ago (2014-08-17 17:18:18 UTC) #70
Message was sent while issue was closed.
Committed patchset #16 (300001) as 290183

Powered by Google App Engine
This is Rietveld 408576698