gecko/ipc/ipdl/test/cxx/PTestBlockChild.ipdl
Chris Jones 0d9ee803ce Bug 540886, part 3: IPDL/C++ test for BlockChild()/UnblockChild(). r=bnewman
--HG--
extra : transplant_source : h%0DM%F8%C5s%82%97%28%AEH%91%86%00%0E%99%A0%05T%1B
2010-01-27 00:41:33 -06:00

52 lines
1008 B
Plaintext

namespace mozilla {
namespace _ipdltest {
rpc protocol PTestBlockChild {
both:
rpc StackFrame();
child:
async Poke1();
async Poke2();
async LastPoke();
async __delete__();
parent:
async P1();
async P2();
async Done();
state START:
// here we |BlockChild()| in the C++
send Poke1 goto CHILD_BLOCKED;
state CHILD_BLOCKED:
call StackFrame goto CHILD_BLOCKED_RPC;
state CHILD_BLOCKED_RPC:
answer StackFrame goto CHILD_BLOCKED_RPC_POKE;
state CHILD_BLOCKED_RPC_POKE:
send Poke2 goto CHILD_STILL_BLOCKED;
// RPC stack frame gone. child should still be blocked
state CHILD_STILL_BLOCKED:
send LastPoke goto CHILD_FLUSH_QUEUE;
// here we |UnblockChild()| in the C++
state CHILD_FLUSH_QUEUE:
recv P1 goto CHILD_FLUSH_QUEUE_P2;
state CHILD_FLUSH_QUEUE_P2:
recv P2 goto CHILD_FLUSH_QUEUE_DONE;
state CHILD_FLUSH_QUEUE_DONE:
recv Done goto DONE;
state DONE:
send __delete__;
};
} // namespace _ipdltest
} // namespace mozilla