Wed, 31 Dec 2014 13:27:57 +0100
Ignore runtime configuration files generated during quality assurance.
1 #ifndef mozilla__ipdltest_TestRacyInterruptReplies_h
2 #define mozilla__ipdltest_TestRacyInterruptReplies_h 1
4 #include "mozilla/_ipdltest/IPDLUnitTests.h"
6 #include "mozilla/_ipdltest/PTestRacyInterruptRepliesParent.h"
7 #include "mozilla/_ipdltest/PTestRacyInterruptRepliesChild.h"
9 namespace mozilla {
10 namespace _ipdltest {
13 class TestRacyInterruptRepliesParent :
14 public PTestRacyInterruptRepliesParent
15 {
16 public:
17 TestRacyInterruptRepliesParent();
18 virtual ~TestRacyInterruptRepliesParent();
20 static bool RunTestInProcesses() { return true; }
21 static bool RunTestInThreads() { return true; }
23 void Main();
25 protected:
26 virtual bool RecvA_() MOZ_OVERRIDE;
28 virtual bool Answer_R(int* replyNum) MOZ_OVERRIDE;
30 virtual void ActorDestroy(ActorDestroyReason why) MOZ_OVERRIDE
31 {
32 if (NormalShutdown != why)
33 fail("unexpected destruction!");
34 passed("ok");
35 QuitParent();
36 }
38 private:
39 int mReplyNum;
40 };
43 class TestRacyInterruptRepliesChild :
44 public PTestRacyInterruptRepliesChild
45 {
46 public:
47 TestRacyInterruptRepliesChild();
48 virtual ~TestRacyInterruptRepliesChild();
50 protected:
51 virtual bool AnswerR_(int* replyNum) MOZ_OVERRIDE;
53 virtual bool RecvChildTest() MOZ_OVERRIDE;
55 virtual bool Recv_A() MOZ_OVERRIDE;
57 virtual void ActorDestroy(ActorDestroyReason why) MOZ_OVERRIDE
58 {
59 if (NormalShutdown != why)
60 fail("unexpected destruction!");
61 QuitChild();
62 }
64 private:
65 int mReplyNum;
66 };
69 } // namespace _ipdltest
70 } // namespace mozilla
73 #endif // ifndef mozilla__ipdltest_TestRacyInterruptReplies_h