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
CrOS-Libchrome-Original-Commit: 313c00e5ed70534d2072e9e4c88016d509a8848b
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 @@
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;