summaryrefslogtreecommitdiffstats
path: root/ipc/ipc_channel_posix_unittest.cc
diff options
context:
space:
mode:
authorkkania@chromium.org <kkania@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-08-09 06:46:06 +0000
committerkkania@chromium.org <kkania@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-08-09 06:46:06 +0000
commit313c00e5ed70534d2072e9e4c88016d509a8848b (patch)
treec5b98bcdfd319eed0ba04511ff57e0518b182a5a /ipc/ipc_channel_posix_unittest.cc
parentc230751ba15f1991943b8936d262940593c61e03 (diff)
downloadchromium_src-313c00e5ed70534d2072e9e4c88016d509a8848b.zip
chromium_src-313c00e5ed70534d2072e9e4c88016d509a8848b.tar.gz
chromium_src-313c00e5ed70534d2072e9e4c88016d509a8848b.tar.bz2
Fix NamedProxyLauncher on windows. Wait for the named pipe to be connectable.
Enable NamedInterfaceTest on windows. BUG=chromium-os:8515 TEST=none Review URL: http://codereview.chromium.org/7486007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@95957 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ipc/ipc_channel_posix_unittest.cc')
-rw-r--r--ipc/ipc_channel_posix_unittest.cc14
1 files changed, 14 insertions, 0 deletions
diff --git a/ipc/ipc_channel_posix_unittest.cc b/ipc/ipc_channel_posix_unittest.cc
index 5e9677d..cc6f20b 100644
--- a/ipc/ipc_channel_posix_unittest.cc
+++ b/ipc/ipc_channel_posix_unittest.cc
@@ -337,6 +337,20 @@ TEST_F(IPCChannelPosixTest, BadMode) {
ASSERT_FALSE(channel.Connect());
}
+TEST_F(IPCChannelPosixTest, IsNamedServerInitialized) {
+ IPCChannelPosixTestListener listener(false);
+ IPC::ChannelHandle chan_handle(kConnectionSocketTestName);
+ ASSERT_TRUE(file_util::Delete(FilePath(kConnectionSocketTestName), false));
+ ASSERT_FALSE(IPC::Channel::IsNamedServerInitialized(
+ kConnectionSocketTestName));
+ IPC::Channel channel(chan_handle, IPC::Channel::MODE_NAMED_SERVER, &listener);
+ ASSERT_TRUE(IPC::Channel::IsNamedServerInitialized(
+ kConnectionSocketTestName));
+ channel.Close();
+ ASSERT_FALSE(IPC::Channel::IsNamedServerInitialized(
+ kConnectionSocketTestName));
+}
+
// A long running process that connects to us
MULTIPROCESS_TEST_MAIN(IPCChannelPosixTestConnectionProc) {
MessageLoopForIO message_loop;