Confirmed users
699
edits
| Line 286: | Line 286: | ||
== Make the TestParent/TestChild do stuff == | == Make the TestParent/TestChild do stuff == | ||
This is up to your imagination. The following is a quick example. Edit the <code>RecvPing()</code> function in <code>ipc/test-harness/TestChild.cpp</code> to be | |||
nsresult | |||
TestChild::RecvPing(int* status) | |||
{ | |||
*status = 42; | |||
return NS_OK; | |||
} | |||
and add this code to <code>ipc/test-harness/TestParent.cpp</code>. | |||
void | |||
TestParent::DoStuff() | |||
{ | |||
int ping; | |||
SendPing(&ping); | |||
printf("[TestParent] child replied to ping with status code %d\n", ping); | |||
} | |||
Enjoy! | |||