ipc/ipdl/test/cxx/PTestShutdown.ipdl

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/ipc/ipdl/test/cxx/PTestShutdown.ipdl	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,37 @@
     1.4 +include protocol PTestShutdownSub;
     1.5 +
     1.6 +namespace mozilla {
     1.7 +namespace _ipdltest {
     1.8 +
     1.9 +intr protocol PTestShutdown {
    1.10 +    manages PTestShutdownSub;
    1.11 +
    1.12 +child:
    1.13 +    Start();
    1.14 +
    1.15 +parent:
    1.16 +    // NB: we test deletion and crashing only, not shutdown, because
    1.17 +    // crashing is the same code path as shutdown, and other IPDL unit
    1.18 +    // tests check shutdown semantics
    1.19 +    PTestShutdownSub(bool expectCrash);
    1.20 +
    1.21 +    // Used to synchronize between parent and child, to avoid races
    1.22 +    // around flushing socket write queues
    1.23 +    sync Sync();
    1.24 +
    1.25 +    __delete__();
    1.26 +
    1.27 +
    1.28 +state START:
    1.29 +    send Start goto TESTING;
    1.30 +
    1.31 +state TESTING:
    1.32 +    recv PTestShutdownSub goto TESTING;
    1.33 +    recv Sync goto DYING;
    1.34 +
    1.35 +state DYING:
    1.36 +    recv __delete__;
    1.37 +};
    1.38 +
    1.39 +} // namespace _ipdltest
    1.40 +} // namespace mozilla

mercurial