Wed, 31 Dec 2014 13:27:57 +0100
Ignore runtime configuration files generated during quality assurance.
1 #ifndef mozilla__ipdltest_TestNestedLoops_h
2 #define mozilla__ipdltest_TestNestedLoops_h 1
4 #include "mozilla/_ipdltest/IPDLUnitTests.h"
6 #include "mozilla/_ipdltest/PTestNestedLoopsParent.h"
7 #include "mozilla/_ipdltest/PTestNestedLoopsChild.h"
9 namespace mozilla {
10 namespace _ipdltest {
13 class TestNestedLoopsParent :
14 public PTestNestedLoopsParent
15 {
16 public:
17 TestNestedLoopsParent();
18 virtual ~TestNestedLoopsParent();
20 static bool RunTestInProcesses() { return true; }
21 static bool RunTestInThreads() { return true; }
23 void Main();
25 protected:
26 virtual bool RecvNonce() MOZ_OVERRIDE;
28 void BreakNestedLoop();
30 virtual void ActorDestroy(ActorDestroyReason why) MOZ_OVERRIDE
31 {
32 if (NormalShutdown != why)
33 fail("unexpected destruction!");
34 passed("ok");
35 QuitParent();
36 }
38 bool mBreakNestedLoop;
39 };
42 class TestNestedLoopsChild :
43 public PTestNestedLoopsChild
44 {
45 public:
46 TestNestedLoopsChild();
47 virtual ~TestNestedLoopsChild();
49 protected:
50 virtual bool RecvStart() MOZ_OVERRIDE;
52 virtual bool AnswerR() MOZ_OVERRIDE;
54 virtual void ActorDestroy(ActorDestroyReason why) MOZ_OVERRIDE
55 {
56 if (NormalShutdown != why)
57 fail("unexpected destruction!");
58 QuitChild();
59 }
60 };
63 } // namespace _ipdltest
64 } // namespace mozilla
67 #endif // ifndef mozilla__ipdltest_TestNestedLoops_h