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

Issue 2093923004: [Cast Channel] Add real SSL tests to CastSocketTest (Closed)

Created:
4 years, 6 months ago by btolsch
Modified:
3 years, 5 months ago
Reviewers:
mark a. foltz, svaldez, Wez
CC:
cbentzel+watch_chromium.org, chromium-apps-reviews_chromium.org, chromium-reviews, davidben, extensions-reviews_chromium.org, Ryan Sleevi
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

[Cast Channel] Add real SSL tests to CastSocketTest CastSocket is tested using a mocked transport which does not use SSL. This can and did lead to integration problems when SSL code is changed (https://crbug.com/622098). This change adds two tests to CastSocketTest which use an SSL socket for their transport instead of the mocked TCP socket. BUG=622554 Review-Url: https://codereview.chromium.org/2093923004 Cr-Commit-Position: refs/heads/master@{#484819} Committed: https://chromium.googlesource.com/chromium/src/+/25ff9b7cb09ab7db6dd453c5d5c43779a58c8159

Patch Set 1 #

Total comments: 16

Patch Set 2 : Responding to rsleevi's comments #

Total comments: 6

Patch Set 3 : Use real TCP sockets instead of fakes #

Total comments: 2

Patch Set 4 : Separate ssl and mock cast socket tests #

Total comments: 20

Patch Set 5 : Respond to comments and nits #

Total comments: 4

Patch Set 6 : Use continuous loop to accept TCP connection #

Total comments: 12

Patch Set 7 : Rebase and respond to comments #

Total comments: 6

Patch Set 8 : Respond to comments #

Patch Set 9 : Rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+601 lines, -136 lines) Patch
M components/cast_channel/cast_socket.h View 1 2 3 4 5 6 7 8 1 chunk +1 line, -9 lines 0 comments Download
M components/cast_channel/cast_socket_unittest.cc View 1 2 3 4 5 6 7 8 37 chunks +428 lines, -127 lines 0 comments Download
A components/test/data/cast_channel/self_signed.pem View 1 2 3 4 5 6 7 1 chunk +172 lines, -0 lines 0 comments Download

Messages

Total messages: 61 (24 generated)
btolsch
PTAL, thanks!
4 years, 6 months ago (2016-06-24 21:24:30 UTC) #2
Ryan Sleevi
My initial reaction is that socket_test_util is growing too large (we spent time the other ...
4 years, 6 months ago (2016-06-24 21:30:44 UTC) #4
Ryan Sleevi
https://codereview.chromium.org/2093923004/diff/1/extensions/browser/api/cast_channel/cast_socket_unittest.cc File extensions/browser/api/cast_channel/cast_socket_unittest.cc (right): https://codereview.chromium.org/2093923004/diff/1/extensions/browser/api/cast_channel/cast_socket_unittest.cc#newcode322 extensions/browser/api/cast_channel/cast_socket_unittest.cc:322: fake_socket_(nullptr) {} Need more documentation throughout this file. It's ...
4 years, 6 months ago (2016-06-24 21:44:52 UTC) #5
btolsch
I also felt unsure about pulling FakeSocket into socket_test_util since it was only the second ...
4 years, 6 months ago (2016-06-25 00:19:29 UTC) #7
btolsch
Friendly ping. Any consensus on socket_test_util or any other issues?
4 years, 5 months ago (2016-06-30 21:03:19 UTC) #10
davidben
On 2016/06/24 21:30:44, Ryan Sleevi wrote: > My initial reaction is that socket_test_util is growing ...
4 years, 5 months ago (2016-06-30 21:06:51 UTC) #12
mmenke
A couple things: * If we want a new test socket class, I agree that ...
4 years, 5 months ago (2016-06-30 21:25:57 UTC) #13
btolsch
Regarding using real sockets, this solution seemed preferable to adding support for the CastMessage protobuf ...
4 years, 5 months ago (2016-06-30 22:05:58 UTC) #14
mmenke
On 2016/06/30 22:05:58, btolsch wrote: > Regarding using real sockets, this solution seemed preferable to ...
4 years, 5 months ago (2016-06-30 22:11:02 UTC) #15
Ryan Sleevi
On 2016/06/30 22:11:02, mmenke wrote: > We have server and client C++ sockets. Shouldn't have ...
4 years, 5 months ago (2016-06-30 22:19:24 UTC) #16
btolsch
On 2016/06/30 22:19:24, Ryan Sleevi wrote: > On 2016/06/30 22:11:02, mmenke wrote: > > We ...
4 years, 5 months ago (2016-06-30 22:38:16 UTC) #17
Wez
Do we really need to use the fake sockets, or could we just use normal ...
4 years, 5 months ago (2016-07-01 01:27:56 UTC) #19
btolsch
On 2016/07/01 01:27:56, Wez wrote: > Do we really need to use the fake sockets, ...
4 years, 5 months ago (2016-07-01 03:20:29 UTC) #20
btolsch
https://codereview.chromium.org/2093923004/diff/20001/extensions/browser/api/cast_channel/cast_socket_unittest.cc File extensions/browser/api/cast_channel/cast_socket_unittest.cc (right): https://codereview.chromium.org/2093923004/diff/20001/extensions/browser/api/cast_channel/cast_socket_unittest.cc#newcode511 extensions/browser/api/cast_channel/cast_socket_unittest.cc:511: std::unique_ptr<net::StreamSocket> server_socket( On 2016/07/01 01:27:56, Wez wrote: > nit: ...
4 years, 5 months ago (2016-07-01 03:21:08 UTC) #21
mark a. foltz
A couple of design observations before getting into a line-by-line review. You've modified TestCastSocket to ...
4 years, 5 months ago (2016-07-02 01:42:31 UTC) #23
mark a. foltz
https://codereview.chromium.org/2093923004/diff/40001/extensions/browser/api/cast_channel/cast_socket_unittest.cc File extensions/browser/api/cast_channel/cast_socket_unittest.cc (right): https://codereview.chromium.org/2093923004/diff/40001/extensions/browser/api/cast_channel/cast_socket_unittest.cc#newcode234 extensions/browser/api/cast_channel/cast_socket_unittest.cc:234: use_tcp_socket_(false) {} This looks like it could be removed ...
4 years, 5 months ago (2016-07-02 01:44:55 UTC) #24
btolsch
I split the ssl and "mock transport" test cases which hopefully improves readability. PTAL, thanks! ...
4 years, 5 months ago (2016-07-13 02:59:49 UTC) #25
mark a. foltz
One round of comments (I didn't take a close look at SslCastSocketTest and related tests ...
4 years, 4 months ago (2016-07-28 00:10:01 UTC) #26
mark a. foltz
https://codereview.chromium.org/2093923004/diff/60001/extensions/browser/api/cast_channel/cast_socket_unittest.cc File extensions/browser/api/cast_channel/cast_socket_unittest.cc (right): https://codereview.chromium.org/2093923004/diff/60001/extensions/browser/api/cast_channel/cast_socket_unittest.cc#newcode272 extensions/browser/api/cast_channel/cast_socket_unittest.cc:272: CreateIPEndPointForTest(), CHANNEL_AUTH_TYPE_SSL, kDistantTimeoutMillis, On 2016/07/28 at 00:10:01, mark a. ...
4 years, 4 months ago (2016-07-28 00:11:49 UTC) #27
btolsch
https://codereview.chromium.org/2093923004/diff/60001/extensions/browser/api/cast_channel/cast_socket_unittest.cc File extensions/browser/api/cast_channel/cast_socket_unittest.cc (right): https://codereview.chromium.org/2093923004/diff/60001/extensions/browser/api/cast_channel/cast_socket_unittest.cc#newcode218 extensions/browser/api/cast_channel/cast_socket_unittest.cc:218: void SetExtractCertResult(bool value) { extract_cert_result_ = value; } On ...
4 years, 4 months ago (2016-08-11 22:31:33 UTC) #28
mark a. foltz
lgtm Thanks for improving our test coverage. Please file a cleanup crbug for removing CHANNEL_AUTH_TYPE_SSL.
4 years, 4 months ago (2016-08-16 18:48:35 UTC) #29
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/2093923004/80001
4 years, 4 months ago (2016-08-16 20:54:02 UTC) #31
commit-bot: I haz the power
Try jobs failed on following builders: win_chromium_rel_ng on master.tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_rel_ng/builds/274621)
4 years, 4 months ago (2016-08-16 21:46:29 UTC) #33
Ryan Sleevi
https://codereview.chromium.org/2093923004/diff/80001/extensions/browser/api/cast_channel/cast_socket_unittest.cc File extensions/browser/api/cast_channel/cast_socket_unittest.cc (right): https://codereview.chromium.org/2093923004/diff/80001/extensions/browser/api/cast_channel/cast_socket_unittest.cc#newcode516 extensions/browser/api/cast_channel/cast_socket_unittest.cc:516: base::Unretained(this)))); DESIGN: You shouldn't assume that these sockets will ...
4 years, 4 months ago (2016-08-17 00:56:32 UTC) #34
Ryan Sleevi
I'll try to do a more thorough review tomorrow; if you don't hear from me, ...
4 years, 4 months ago (2016-08-17 00:57:22 UTC) #35
btolsch
On 2016/08/17 00:57:22, Ryan Sleevi (slow) wrote: > I'll try to do a more thorough ...
4 years, 4 months ago (2016-08-17 01:04:28 UTC) #36
Ryan Sleevi
On 2016/08/17 01:04:28, btolsch wrote: > On 2016/08/17 00:57:22, Ryan Sleevi (slow) wrote: > > ...
4 years, 4 months ago (2016-08-17 01:06:25 UTC) #37
btolsch
rsleevi PTAL, thanks! https://codereview.chromium.org/2093923004/diff/80001/extensions/browser/api/cast_channel/cast_socket_unittest.cc File extensions/browser/api/cast_channel/cast_socket_unittest.cc (right): https://codereview.chromium.org/2093923004/diff/80001/extensions/browser/api/cast_channel/cast_socket_unittest.cc#newcode516 extensions/browser/api/cast_channel/cast_socket_unittest.cc:516: base::Unretained(this)))); On 2016/08/17 00:56:32, Ryan Sleevi ...
4 years, 3 months ago (2016-09-06 20:46:26 UTC) #38
Ryan Sleevi
Sorry for the delay in responding here. I've cc'd svaldez@ in the hope he'll be ...
4 years, 3 months ago (2016-09-16 01:39:07 UTC) #40
svaldez
On 2016/09/16 01:39:07, Ryan Sleevi (slow) wrote: > Sorry for the delay in responding here. ...
4 years, 3 months ago (2016-09-16 19:05:45 UTC) #41
Wez
Brandon: Is this CL still relevant to land, or shall we close it out?
3 years, 6 months ago (2017-06-20 21:49:13 UTC) #42
btolsch
I'd like to take another shot at landing these tests. @svaldez: I responded to rsleevi's ...
3 years, 6 months ago (2017-06-22 04:23:53 UTC) #44
svaldez
Sounds like the ETS rewrite needs to be more in-depth to get a raw socket ...
3 years, 5 months ago (2017-07-06 15:00:18 UTC) #45
btolsch
Thanks for taking a look at this svaldez. Android bots seems to be failing without ...
3 years, 5 months ago (2017-07-06 21:13:39 UTC) #54
svaldez
lgtm, the Android failures seem to be infra issues.
3 years, 5 months ago (2017-07-06 21:37:03 UTC) #55
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/2093923004/160001
3 years, 5 months ago (2017-07-07 02:32:49 UTC) #58
commit-bot: I haz the power
3 years, 5 months ago (2017-07-07 03:32:23 UTC) #61
Message was sent while issue was closed.
Committed patchset #9 (id:160001) as
https://chromium.googlesource.com/chromium/src/+/25ff9b7cb09ab7db6dd453c5d5c4...

Powered by Google App Engine
This is Rietveld 408576698