Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(793)

Unified Diff: ipc/sync_socket_unittest.cc

Issue 2455583002: Revert of Change most IPC tests to use ChannelMojo. (Closed)
Patch Set: Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ipc/ipc_test_base.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ipc/sync_socket_unittest.cc
diff --git a/ipc/sync_socket_unittest.cc b/ipc/sync_socket_unittest.cc
index 67253aa624cafd29d36604ecad5eea3d1eb0bfb6..07a920cc70c48d886b40bcc358087db6cbefeb7d 100644
--- a/ipc/sync_socket_unittest.cc
+++ b/ipc/sync_socket_unittest.cc
@@ -109,12 +109,16 @@
// Runs the fuzzing server child mode. Returns when the preset number of
// messages have been received.
-DEFINE_IPC_CHANNEL_MOJO_TEST_CLIENT(SyncSocketServerClient) {
+MULTIPROCESS_IPC_TEST_CLIENT_MAIN(SyncSocketServerClient) {
+ base::MessageLoopForIO main_message_loop;
SyncSocketServerListener listener;
- Connect(&listener);
- listener.Init(channel());
+ std::unique_ptr<IPC::Channel> channel(IPC::Channel::CreateClient(
+ IPCTestBase::GetChannelName("SyncSocketServerClient"), &listener,
+ main_message_loop.task_runner()));
+ EXPECT_TRUE(channel->Connect());
+ listener.Init(channel.get());
base::RunLoop().Run();
- Close();
+ return 0;
}
// The SyncSocket client listener only processes one sort of message,
@@ -162,13 +166,15 @@
DISALLOW_COPY_AND_ASSIGN(SyncSocketClientListener);
};
-using SyncSocketTest = IPCChannelMojoTestBase;
+class SyncSocketTest : public IPCTestBase {
+};
TEST_F(SyncSocketTest, SanityTest) {
Init("SyncSocketServerClient");
SyncSocketClientListener listener;
CreateChannel(&listener);
+ ASSERT_TRUE(StartClient());
// Create a pair of SyncSockets.
base::SyncSocket pair[2];
base::SyncSocket::CreatePair(&pair[0], &pair[1]);
« no previous file with comments | « ipc/ipc_test_base.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698