summaryrefslogtreecommitdiffstats
path: root/ipc/sync_socket_unittest.cc
diff options
context:
space:
mode:
authorcpu@chromium.org <cpu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-12-04 22:53:22 +0000
committercpu@chromium.org <cpu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-12-04 22:53:22 +0000
commitd8b65915b2181a863611254c3cefb966103386f3 (patch)
tree407ca5888d6e468854b78c701a4dac0fe811a6a0 /ipc/sync_socket_unittest.cc
parent0baf8d2d5e43cbbc99700e0acf5eb0676c209972 (diff)
downloadchromium_src-d8b65915b2181a863611254c3cefb966103386f3.zip
chromium_src-d8b65915b2181a863611254c3cefb966103386f3.tar.gz
chromium_src-d8b65915b2181a863611254c3cefb966103386f3.tar.bz2
Add non-blocking peek for the syncsocket
- Windows only BUG=none TEST=unit test included Review URL: http://codereview.chromium.org/464020 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@33876 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ipc/sync_socket_unittest.cc')
-rw-r--r--ipc/sync_socket_unittest.cc5
1 files changed, 5 insertions, 0 deletions
diff --git a/ipc/sync_socket_unittest.cc b/ipc/sync_socket_unittest.cc
index 9820009..7710c09 100644
--- a/ipc/sync_socket_unittest.cc
+++ b/ipc/sync_socket_unittest.cc
@@ -189,6 +189,11 @@ class SyncSocketClientListener : public IPC::Channel::Listener {
// string as was written on the SyncSocket. These are compared
// and a shutdown message is sent back to the server.
void OnMsgClassResponse(const std::string& str) {
+#if defined(OS_WIN)
+ // We rely on the order of sync_socket.Send() and chan_->Send() in
+ // the SyncSocketServerListener object.
+ EXPECT_EQ(kHelloStringLength, socket_->Peek());
+#endif
char buf[kHelloStringLength];
socket_->Receive(static_cast<void*>(buf), kHelloStringLength);
EXPECT_EQ(strcmp(str.c_str(), buf), 0);