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

Unified Diff: net/socket/client_socket_pool_base_unittest.cc

Issue 1091793002: Report the connect status of the oldest connection in the socket pool. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Use a list instead of a set. Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: net/socket/client_socket_pool_base_unittest.cc
diff --git a/net/socket/client_socket_pool_base_unittest.cc b/net/socket/client_socket_pool_base_unittest.cc
index 391fb61e6d0557b28932f96059d13bf8db2b30ff..5cc94984a76d5a49183993dfa365c4b8af8fe1d1 100644
--- a/net/socket/client_socket_pool_base_unittest.cc
+++ b/net/socket/client_socket_pool_base_unittest.cc
@@ -1979,18 +1979,12 @@ TEST_F(ClientSocketPoolBaseTest, LoadStateTwoRequests) {
BoundNetLog());
EXPECT_EQ(ERR_IO_PENDING, rv);
- // If the first Job is in an earlier state than the second, the state of
- // the second job should be used for both handles.
- client_socket_factory_.SetJobLoadState(0, LOAD_STATE_RESOLVING_HOST);
- EXPECT_EQ(LOAD_STATE_CONNECTING, handle.GetLoadState());
EXPECT_EQ(LOAD_STATE_CONNECTING, handle2.GetLoadState());
mmenke 2015/04/20 14:49:16 This seems a little weird now. Suggest moving the
mmenke 2015/04/20 20:32:16 Actually, going backwards in general seems a littl
haavardm 2015/04/21 13:28:36 Done.
- // If the second Job is in an earlier state than the second, the state of
- // the first job should be used for both handles.
- client_socket_factory_.SetJobLoadState(0, LOAD_STATE_SSL_HANDSHAKE);
- // One request is farther
- EXPECT_EQ(LOAD_STATE_SSL_HANDSHAKE, handle.GetLoadState());
- EXPECT_EQ(LOAD_STATE_SSL_HANDSHAKE, handle2.GetLoadState());
+ // Check that both handles report the state of the first job.
+ client_socket_factory_.SetJobLoadState(0, LOAD_STATE_RESOLVING_HOST);
+ EXPECT_EQ(LOAD_STATE_RESOLVING_HOST, handle.GetLoadState());
+ EXPECT_EQ(LOAD_STATE_RESOLVING_HOST, handle2.GetLoadState());
mmenke 2015/04/20 14:49:16 I'm paranoid: Could you have another test just li
haavardm 2015/04/21 13:28:36 Done.
// Farthest along job connects and the first request gets the socket. The
// second handle switches to the state of the remaining ConnectJob.
mmenke 2015/04/20 14:49:16 This comment is no longer accurate (It's the one t
haavardm 2015/04/21 13:28:36 Done.
« net/socket/client_socket_pool_base.cc ('K') | « net/socket/client_socket_pool_base.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698