summaryrefslogtreecommitdiffstats
path: root/net/socket/socket_test_util.h
diff options
context:
space:
mode:
authormbelshe@google.com <mbelshe@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-11-23 17:53:37 +0000
committermbelshe@google.com <mbelshe@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-11-23 17:53:37 +0000
commit12037ed42a8a72539046078d5e486af672174b86 (patch)
tree34bdd41233f4c7fc62ab2799fe2eae5b0852cfcd /net/socket/socket_test_util.h
parent57c74c84262d3a216be530d281b0dd530ccde406 (diff)
downloadchromium_src-12037ed42a8a72539046078d5e486af672174b86.zip
chromium_src-12037ed42a8a72539046078d5e486af672174b86.tar.gz
chromium_src-12037ed42a8a72539046078d5e486af672174b86.tar.bz2
The async notification via OnReadComplete was still posting
a callback through this message loop. This makes it difficult to write tests, as callbacks already scheduled will go in front of the OnReadComplete(). Treat the notifications through OnReadComplete as synchronous always. This doesn't effect existing tests, but makes my new tests possible. BUG=none TEST=this is the test! Review URL: http://codereview.chromium.org/414073 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@32807 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/socket/socket_test_util.h')
-rw-r--r--net/socket/socket_test_util.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/net/socket/socket_test_util.h b/net/socket/socket_test_util.h
index d16dcb4..96c5ea7 100644
--- a/net/socket/socket_test_util.h
+++ b/net/socket/socket_test_util.h
@@ -287,6 +287,8 @@ class MockClientSocket : public net::SSLClientSocket {
// If an async IO is pending because the SocketDataProvider returned
// ERR_IO_PENDING, then the MockClientSocket waits until this OnReadComplete
// is called to complete the asynchronous read operation.
+ // data.async is ignored, and this read is completed synchronously as
+ // part of this call.
virtual void OnReadComplete(const MockRead& data) = 0;
protected: