michael@0: #ifndef mozilla__ipdltest_TestInterruptShutdownRace_h michael@0: #define mozilla__ipdltest_TestInterruptShutdownRace_h 1 michael@0: michael@0: #include "mozilla/_ipdltest/IPDLUnitTests.h" michael@0: michael@0: #include "mozilla/_ipdltest/PTestInterruptShutdownRaceParent.h" michael@0: #include "mozilla/_ipdltest/PTestInterruptShutdownRaceChild.h" michael@0: michael@0: namespace mozilla { michael@0: namespace _ipdltest { michael@0: michael@0: michael@0: class TestInterruptShutdownRaceParent : michael@0: public PTestInterruptShutdownRaceParent michael@0: { michael@0: public: michael@0: TestInterruptShutdownRaceParent(); michael@0: virtual ~TestInterruptShutdownRaceParent(); michael@0: michael@0: static bool RunTestInProcesses() { return true; } michael@0: // FIXME/bug 703323 Could work if modified michael@0: static bool RunTestInThreads() { return false; } michael@0: michael@0: void Main(); michael@0: michael@0: virtual bool RecvStartDeath() MOZ_OVERRIDE; michael@0: michael@0: virtual bool RecvOrphan() MOZ_OVERRIDE; michael@0: michael@0: protected: michael@0: void StartShuttingDown(); michael@0: michael@0: virtual void ActorDestroy(ActorDestroyReason why) MOZ_OVERRIDE michael@0: { michael@0: if (AbnormalShutdown != why) michael@0: fail("unexpected destruction!"); michael@0: } michael@0: }; michael@0: michael@0: michael@0: class TestInterruptShutdownRaceChild : michael@0: public PTestInterruptShutdownRaceChild michael@0: { michael@0: public: michael@0: TestInterruptShutdownRaceChild(); michael@0: virtual ~TestInterruptShutdownRaceChild(); michael@0: michael@0: protected: michael@0: virtual bool RecvStart() MOZ_OVERRIDE; michael@0: michael@0: virtual bool AnswerExit() MOZ_OVERRIDE; michael@0: michael@0: virtual void ActorDestroy(ActorDestroyReason why) MOZ_OVERRIDE michael@0: { michael@0: fail("should have 'crashed'!"); michael@0: } michael@0: }; michael@0: michael@0: michael@0: } // namespace _ipdltest michael@0: } // namespace mozilla michael@0: michael@0: michael@0: #endif // ifndef mozilla__ipdltest_TestInterruptShutdownRace_h