summaryrefslogtreecommitdiffstats
path: root/net/socket/socket_test_util.h
diff options
context:
space:
mode:
authormbelshe@chromium.org <mbelshe@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-04-22 15:25:57 +0000
committermbelshe@chromium.org <mbelshe@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-04-22 15:25:57 +0000
commit23e095ecd5b4ada88e343b6ce5c7d4f094ca71e6 (patch)
treeeebf1c96a90a1fcf71d6fcd28df2a1c68f22a00f /net/socket/socket_test_util.h
parent459773c256a5d5f7d001298481c8e503a5a1f588 (diff)
downloadchromium_src-23e095ecd5b4ada88e343b6ce5c7d4f094ca71e6.zip
chromium_src-23e095ecd5b4ada88e343b6ce5c7d4f094ca71e6.tar.gz
chromium_src-23e095ecd5b4ada88e343b6ce5c7d4f094ca71e6.tar.bz2
Unlike a real TCPClientSocket, the MockTCPClientSocket was still calling
the pending_callback_ for IO after being disconnected. This did cause a bug in one of the SpdySession tests, SpdyNetworkTransactionTest.WriteError, since the SpdySession would delete itself shortly after calling Disconnect on its socket. Contributed by gavinp@google.com BUG=41394 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@45317 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/socket/socket_test_util.h')
-rw-r--r--net/socket/socket_test_util.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/net/socket/socket_test_util.h b/net/socket/socket_test_util.h
index b42b272..91522ed 100644
--- a/net/socket/socket_test_util.h
+++ b/net/socket/socket_test_util.h
@@ -355,6 +355,7 @@ class MockTCPClientSocket : public MockClientSocket {
// ClientSocket methods:
virtual int Connect(net::CompletionCallback* callback,
const BoundNetLog& net_log);
+ virtual void Disconnect();
virtual bool IsConnected() const;
virtual bool IsConnectedAndIdle() const { return IsConnected(); }