Wed, 31 Dec 2014 13:27:57 +0100
Ignore runtime configuration files generated during quality assurance.
1 #ifndef mozilla__ipdltest_TestManyChildAllocs_h
2 #define mozilla__ipdltest_TestManyChildAllocs_h 1
4 #include "mozilla/_ipdltest/IPDLUnitTests.h"
6 #include "mozilla/_ipdltest/PTestManyChildAllocsParent.h"
7 #include "mozilla/_ipdltest/PTestManyChildAllocsChild.h"
9 #include "mozilla/_ipdltest/PTestManyChildAllocsSubParent.h"
10 #include "mozilla/_ipdltest/PTestManyChildAllocsSubChild.h"
12 namespace mozilla {
13 namespace _ipdltest {
15 // top-level protocol
17 class TestManyChildAllocsParent :
18 public PTestManyChildAllocsParent
19 {
20 public:
21 TestManyChildAllocsParent();
22 virtual ~TestManyChildAllocsParent();
24 static bool RunTestInProcesses() { return true; }
25 static bool RunTestInThreads() { return true; }
27 void Main();
29 protected:
30 virtual bool RecvDone() MOZ_OVERRIDE;
31 virtual bool DeallocPTestManyChildAllocsSubParent(PTestManyChildAllocsSubParent* __a) MOZ_OVERRIDE;
32 virtual PTestManyChildAllocsSubParent* AllocPTestManyChildAllocsSubParent() MOZ_OVERRIDE;
34 virtual void ActorDestroy(ActorDestroyReason why) MOZ_OVERRIDE
35 {
36 if (NormalShutdown != why)
37 fail("unexpected destruction!");
38 passed("ok");
39 QuitParent();
40 }
41 };
44 class TestManyChildAllocsChild :
45 public PTestManyChildAllocsChild
46 {
47 public:
48 TestManyChildAllocsChild();
49 virtual ~TestManyChildAllocsChild();
51 protected:
52 virtual bool RecvGo() MOZ_OVERRIDE;
53 virtual bool DeallocPTestManyChildAllocsSubChild(PTestManyChildAllocsSubChild* __a) MOZ_OVERRIDE;
54 virtual PTestManyChildAllocsSubChild* AllocPTestManyChildAllocsSubChild() MOZ_OVERRIDE;
56 virtual void ActorDestroy(ActorDestroyReason why) MOZ_OVERRIDE
57 {
58 if (NormalShutdown != why)
59 fail("unexpected destruction!");
60 QuitChild();
61 }
62 };
65 // do-nothing sub-protocol actors
67 class TestManyChildAllocsSubParent :
68 public PTestManyChildAllocsSubParent
69 {
70 public:
71 TestManyChildAllocsSubParent() { }
72 virtual ~TestManyChildAllocsSubParent() { }
74 protected:
75 virtual bool RecvHello() MOZ_OVERRIDE { return true; }
76 };
79 class TestManyChildAllocsSubChild :
80 public PTestManyChildAllocsSubChild
81 {
82 public:
83 TestManyChildAllocsSubChild() { }
84 virtual ~TestManyChildAllocsSubChild() { }
85 };
89 } // namepsace _ipdltest
90 } // namespace mozilla
93 #endif // ifndef mozilla__ipdltest_TestManyChildAllocs_h