| Index: ipc/ipc_channel_posix_unittest.cc
|
| diff --git a/ipc/ipc_channel_posix_unittest.cc b/ipc/ipc_channel_posix_unittest.cc
|
| index 5e9677d6dea52cc03e1db5556cae0b6fa4c8c398..cc6f20b96ea346db065a8e162eb62e07538a2a80 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;
|
|
|