| Index: ipc/attachment_broker_privileged_win_unittest.cc
|
| diff --git a/ipc/attachment_broker_privileged_win_unittest.cc b/ipc/attachment_broker_privileged_win_unittest.cc
|
| index dc3bffc14e05db2938066512f7bc7f8244e628e7..3c8df8e806468a4ec53c1a5095ab728ad6901bc3 100644
|
| --- a/ipc/attachment_broker_privileged_win_unittest.cc
|
| +++ b/ipc/attachment_broker_privileged_win_unittest.cc
|
| @@ -265,11 +265,21 @@ class IPCAttachmentBrokerPrivilegedWinTest : public IPCTestBase {
|
| }
|
|
|
| void CommonSetUp() {
|
| + PreConnectSetUp();
|
| + PostConnectSetUp();
|
| + }
|
| +
|
| + // All of setup before the channel is connected.
|
| + void PreConnectSetUp() {
|
| if (!broker_.get())
|
| set_broker(new IPC::AttachmentBrokerUnprivilegedWin);
|
| broker_->AddObserver(&observer_, task_runner());
|
| CreateChannel(&proxy_listener_);
|
| broker_->RegisterBrokerCommunicationChannel(channel());
|
| + }
|
| +
|
| + // All of setup including the connection and everything after.
|
| + void PostConnectSetUp() {
|
| ASSERT_TRUE(ConnectChannel());
|
| ASSERT_TRUE(StartClient());
|
|
|
| @@ -390,10 +400,12 @@ TEST_F(IPCAttachmentBrokerPrivilegedWinTest, SendHandleToSelf) {
|
| Init("SendHandleToSelf");
|
|
|
| set_broker(new MockBroker);
|
| - CommonSetUp();
|
| +
|
| + PreConnectSetUp();
|
| // Technically, the channel is an endpoint, but we need the proxy listener to
|
| // receive the messages so that it can quit the message loop.
|
| channel()->SetAttachmentBrokerEndpoint(false);
|
| + PostConnectSetUp();
|
| get_proxy_listener()->set_listener(get_broker());
|
|
|
| HANDLE h = CreateTempFile();
|
|
|