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

Unified Diff: ipc/ipc_fuzzing_tests.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_channel_proxy_unittest.cc ('k') | ipc/ipc_send_fds_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ipc/ipc_fuzzing_tests.cc
diff --git a/ipc/ipc_fuzzing_tests.cc b/ipc/ipc_fuzzing_tests.cc
index e47c691962b7ccd37377fd07aefe2cde57e7637d..2cf58950e3d8bc6287b82b961ddf052ff6284aff 100644
--- a/ipc/ipc_fuzzing_tests.cc
+++ b/ipc/ipc_fuzzing_tests.cc
@@ -258,15 +258,20 @@
// Runs the fuzzing server child mode. Returns when the preset number of
// messages have been received.
-DEFINE_IPC_CHANNEL_MOJO_TEST_CLIENT(FuzzServerClient) {
+MULTIPROCESS_IPC_TEST_CLIENT_MAIN(FuzzServerClient) {
+ base::MessageLoopForIO main_message_loop;
FuzzerServerListener listener;
- Connect(&listener);
- listener.Init(channel());
+ std::unique_ptr<IPC::Channel> channel(IPC::Channel::CreateClient(
+ IPCTestBase::GetChannelName("FuzzServerClient"), &listener,
+ main_message_loop.task_runner()));
+ CHECK(channel->Connect());
+ listener.Init(channel.get());
base::RunLoop().Run();
- Close();
-}
-
-using IPCFuzzingTest = IPCChannelMojoTestBase;
+ return 0;
+}
+
+class IPCFuzzingTest : public IPCTestBase {
+};
// This test makes sure that the FuzzerClientListener and FuzzerServerListener
// are working properly by generating two well formed IPC calls.
@@ -277,6 +282,7 @@
CreateChannel(&listener);
listener.Init(channel());
ASSERT_TRUE(ConnectChannel());
+ ASSERT_TRUE(StartClient());
IPC::Message* msg = NULL;
int value = 43;
@@ -304,6 +310,7 @@
CreateChannel(&listener);
listener.Init(channel());
ASSERT_TRUE(ConnectChannel());
+ ASSERT_TRUE(StartClient());
IPC::Message* msg = new IPC::Message(MSG_ROUTING_CONTROL, MsgClassIS::ID,
IPC::Message::PRIORITY_NORMAL);
@@ -331,6 +338,7 @@
CreateChannel(&listener);
listener.Init(channel());
ASSERT_TRUE(ConnectChannel());
+ ASSERT_TRUE(StartClient());
IPC::Message* msg = new IPC::Message(MSG_ROUTING_CONTROL, MsgClassSI::ID,
IPC::Message::PRIORITY_NORMAL);
« no previous file with comments | « ipc/ipc_channel_proxy_unittest.cc ('k') | ipc/ipc_send_fds_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698