Wed, 31 Dec 2014 13:27:57 +0100
Ignore runtime configuration files generated during quality assurance.
1 #ifndef mozilla__ipdltest_TestInterruptShutdownRace_h
2 #define mozilla__ipdltest_TestInterruptShutdownRace_h 1
4 #include "mozilla/_ipdltest/IPDLUnitTests.h"
6 #include "mozilla/_ipdltest/PTestInterruptShutdownRaceParent.h"
7 #include "mozilla/_ipdltest/PTestInterruptShutdownRaceChild.h"
9 namespace mozilla {
10 namespace _ipdltest {
13 class TestInterruptShutdownRaceParent :
14 public PTestInterruptShutdownRaceParent
15 {
16 public:
17 TestInterruptShutdownRaceParent();
18 virtual ~TestInterruptShutdownRaceParent();
20 static bool RunTestInProcesses() { return true; }
21 // FIXME/bug 703323 Could work if modified
22 static bool RunTestInThreads() { return false; }
24 void Main();
26 virtual bool RecvStartDeath() MOZ_OVERRIDE;
28 virtual bool RecvOrphan() MOZ_OVERRIDE;
30 protected:
31 void StartShuttingDown();
33 virtual void ActorDestroy(ActorDestroyReason why) MOZ_OVERRIDE
34 {
35 if (AbnormalShutdown != why)
36 fail("unexpected destruction!");
37 }
38 };
41 class TestInterruptShutdownRaceChild :
42 public PTestInterruptShutdownRaceChild
43 {
44 public:
45 TestInterruptShutdownRaceChild();
46 virtual ~TestInterruptShutdownRaceChild();
48 protected:
49 virtual bool RecvStart() MOZ_OVERRIDE;
51 virtual bool AnswerExit() MOZ_OVERRIDE;
53 virtual void ActorDestroy(ActorDestroyReason why) MOZ_OVERRIDE
54 {
55 fail("should have 'crashed'!");
56 }
57 };
60 } // namespace _ipdltest
61 } // namespace mozilla
64 #endif // ifndef mozilla__ipdltest_TestInterruptShutdownRace_h