Index: ipc/ipc_channel_posix_unittest.cc |
diff --git a/ipc/ipc_channel_posix_unittest.cc b/ipc/ipc_channel_posix_unittest.cc |
index 0ed66797aa11e84a02cc0044927d5acdcfc0e2f0..c76af5a8d9db6df0bd080fb2f4446d09cd002a76 100644 |
--- a/ipc/ipc_channel_posix_unittest.cc |
+++ b/ipc/ipc_channel_posix_unittest.cc |
@@ -113,15 +113,6 @@ |
static void SpinRunLoop(base::TimeDelta delay); |
static const std::string GetConnectionSocketName(); |
static const std::string GetChannelDirName(); |
- |
- bool WaitForExit(base::Process& process, int* exit_code) { |
-#if defined(OS_ANDROID) |
- return AndroidWaitForChildExitWithTimeout( |
- process, base::TimeDelta::Max(), exit_code); |
-#else |
- return process.WaitForExit(exit_code); |
-#endif // defined(OS_ANDROID) |
- } |
protected: |
void SetUp() override; |
@@ -267,7 +258,12 @@ |
ASSERT_EQ(IPCChannelPosixTestListener::CHANNEL_ERROR, out_listener.status()); |
} |
-TEST_F(IPCChannelPosixTest, AdvancedConnected) { |
+#if defined(OS_ANDROID) |
+#define MAYBE_AdvancedConnected DISABLED_AdvancedConnected |
+#else |
+#define MAYBE_AdvancedConnected AdvancedConnected |
+#endif |
+TEST_F(IPCChannelPosixTest, MAYBE_AdvancedConnected) { |
// Test creating a connection to an external process. |
IPCChannelPosixTestListener listener(false); |
IPC::ChannelHandle chan_handle(GetConnectionSocketName()); |
@@ -289,14 +285,19 @@ |
channel->Send(message); |
SpinRunLoop(TestTimeouts::action_timeout()); |
int exit_code = 0; |
- EXPECT_TRUE(WaitForExit(process, &exit_code)); |
+ EXPECT_TRUE(process.WaitForExit(&exit_code)); |
EXPECT_EQ(0, exit_code); |
ASSERT_EQ(IPCChannelPosixTestListener::CHANNEL_ERROR, listener.status()); |
ASSERT_FALSE(channel->HasAcceptedConnection()); |
unlink(chan_handle.name.c_str()); |
} |
-TEST_F(IPCChannelPosixTest, ResetState) { |
+#if defined(OS_ANDROID) |
+#define MAYBE_ResetState DISABLED_ResetState |
+#else |
+#define MAYBE_ResetState ResetState |
+#endif |
+TEST_F(IPCChannelPosixTest, MAYBE_ResetState) { |
// Test creating a connection to an external process. Close the connection, |
// but continue to listen and make sure another external process can connect |
// to us. |
@@ -329,7 +330,7 @@ |
SpinRunLoop(TestTimeouts::action_timeout()); |
EXPECT_TRUE(process.Terminate(0, false)); |
int exit_code = 0; |
- EXPECT_TRUE(WaitForExit(process2, &exit_code)); |
+ EXPECT_TRUE(process2.WaitForExit(&exit_code)); |
EXPECT_EQ(0, exit_code); |
ASSERT_EQ(IPCChannelPosixTestListener::CHANNEL_ERROR, listener.status()); |
ASSERT_FALSE(channel->HasAcceptedConnection()); |
@@ -358,7 +359,12 @@ |
EXPECT_FALSE(channel2->Connect()); |
} |
-TEST_F(IPCChannelPosixTest, MultiConnection) { |
+#if defined(OS_ANDROID) |
+#define MAYBE_MultiConnection DISABLED_MultiConnection |
+#else |
+#define MAYBE_MultiConnection MultiConnection |
+#endif |
+TEST_F(IPCChannelPosixTest, MAYBE_MultiConnection) { |
// Test setting up a connection to an external process, and then have |
// another external process attempt to connect to us. |
IPCChannelPosixTestListener listener(false); |
@@ -379,7 +385,7 @@ |
ASSERT_TRUE(process2.IsValid()); |
SpinRunLoop(TestTimeouts::action_max_timeout()); |
int exit_code = 0; |
- EXPECT_TRUE(WaitForExit(process2, &exit_code)); |
+ EXPECT_TRUE(process2.WaitForExit(&exit_code)); |
EXPECT_EQ(exit_code, 0); |
ASSERT_EQ(IPCChannelPosixTestListener::DENIED, listener.status()); |
ASSERT_TRUE(channel->HasAcceptedConnection()); |
@@ -388,7 +394,7 @@ |
IPC::Message::PRIORITY_NORMAL); |
channel->Send(message); |
SpinRunLoop(TestTimeouts::action_timeout()); |
- EXPECT_TRUE(WaitForExit(process, &exit_code)); |
+ EXPECT_TRUE(process.WaitForExit(&exit_code)); |
EXPECT_EQ(exit_code, 0); |
ASSERT_EQ(IPCChannelPosixTestListener::CHANNEL_ERROR, listener.status()); |
ASSERT_FALSE(channel->HasAcceptedConnection()); |