ipc/ipdl/test/cxx/TestManyChildAllocs.h

Wed, 31 Dec 2014 13:27:57 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 13:27:57 +0100
branch
TOR_BUG_3246
changeset 6
8bccb770b82d
permissions
-rw-r--r--

Ignore runtime configuration files generated during quality assurance.

michael@0 1 #ifndef mozilla__ipdltest_TestManyChildAllocs_h
michael@0 2 #define mozilla__ipdltest_TestManyChildAllocs_h 1
michael@0 3
michael@0 4 #include "mozilla/_ipdltest/IPDLUnitTests.h"
michael@0 5
michael@0 6 #include "mozilla/_ipdltest/PTestManyChildAllocsParent.h"
michael@0 7 #include "mozilla/_ipdltest/PTestManyChildAllocsChild.h"
michael@0 8
michael@0 9 #include "mozilla/_ipdltest/PTestManyChildAllocsSubParent.h"
michael@0 10 #include "mozilla/_ipdltest/PTestManyChildAllocsSubChild.h"
michael@0 11
michael@0 12 namespace mozilla {
michael@0 13 namespace _ipdltest {
michael@0 14
michael@0 15 // top-level protocol
michael@0 16
michael@0 17 class TestManyChildAllocsParent :
michael@0 18 public PTestManyChildAllocsParent
michael@0 19 {
michael@0 20 public:
michael@0 21 TestManyChildAllocsParent();
michael@0 22 virtual ~TestManyChildAllocsParent();
michael@0 23
michael@0 24 static bool RunTestInProcesses() { return true; }
michael@0 25 static bool RunTestInThreads() { return true; }
michael@0 26
michael@0 27 void Main();
michael@0 28
michael@0 29 protected:
michael@0 30 virtual bool RecvDone() MOZ_OVERRIDE;
michael@0 31 virtual bool DeallocPTestManyChildAllocsSubParent(PTestManyChildAllocsSubParent* __a) MOZ_OVERRIDE;
michael@0 32 virtual PTestManyChildAllocsSubParent* AllocPTestManyChildAllocsSubParent() MOZ_OVERRIDE;
michael@0 33
michael@0 34 virtual void ActorDestroy(ActorDestroyReason why) MOZ_OVERRIDE
michael@0 35 {
michael@0 36 if (NormalShutdown != why)
michael@0 37 fail("unexpected destruction!");
michael@0 38 passed("ok");
michael@0 39 QuitParent();
michael@0 40 }
michael@0 41 };
michael@0 42
michael@0 43
michael@0 44 class TestManyChildAllocsChild :
michael@0 45 public PTestManyChildAllocsChild
michael@0 46 {
michael@0 47 public:
michael@0 48 TestManyChildAllocsChild();
michael@0 49 virtual ~TestManyChildAllocsChild();
michael@0 50
michael@0 51 protected:
michael@0 52 virtual bool RecvGo() MOZ_OVERRIDE;
michael@0 53 virtual bool DeallocPTestManyChildAllocsSubChild(PTestManyChildAllocsSubChild* __a) MOZ_OVERRIDE;
michael@0 54 virtual PTestManyChildAllocsSubChild* AllocPTestManyChildAllocsSubChild() MOZ_OVERRIDE;
michael@0 55
michael@0 56 virtual void ActorDestroy(ActorDestroyReason why) MOZ_OVERRIDE
michael@0 57 {
michael@0 58 if (NormalShutdown != why)
michael@0 59 fail("unexpected destruction!");
michael@0 60 QuitChild();
michael@0 61 }
michael@0 62 };
michael@0 63
michael@0 64
michael@0 65 // do-nothing sub-protocol actors
michael@0 66
michael@0 67 class TestManyChildAllocsSubParent :
michael@0 68 public PTestManyChildAllocsSubParent
michael@0 69 {
michael@0 70 public:
michael@0 71 TestManyChildAllocsSubParent() { }
michael@0 72 virtual ~TestManyChildAllocsSubParent() { }
michael@0 73
michael@0 74 protected:
michael@0 75 virtual bool RecvHello() MOZ_OVERRIDE { return true; }
michael@0 76 };
michael@0 77
michael@0 78
michael@0 79 class TestManyChildAllocsSubChild :
michael@0 80 public PTestManyChildAllocsSubChild
michael@0 81 {
michael@0 82 public:
michael@0 83 TestManyChildAllocsSubChild() { }
michael@0 84 virtual ~TestManyChildAllocsSubChild() { }
michael@0 85 };
michael@0 86
michael@0 87
michael@0 88
michael@0 89 } // namepsace _ipdltest
michael@0 90 } // namespace mozilla
michael@0 91
michael@0 92
michael@0 93 #endif // ifndef mozilla__ipdltest_TestManyChildAllocs_h

mercurial