Wed, 31 Dec 2014 13:27:57 +0100
Ignore runtime configuration files generated during quality assurance.
michael@0 | 1 | #ifndef mozilla__ipdltest_TestSyncHang_h |
michael@0 | 2 | #define mozilla__ipdltest_TestSyncHang_h 1 |
michael@0 | 3 | |
michael@0 | 4 | #include "mozilla/_ipdltest/IPDLUnitTests.h" |
michael@0 | 5 | |
michael@0 | 6 | #include "mozilla/_ipdltest/PTestSyncHangParent.h" |
michael@0 | 7 | #include "mozilla/_ipdltest/PTestSyncHangChild.h" |
michael@0 | 8 | |
michael@0 | 9 | namespace mozilla { |
michael@0 | 10 | namespace _ipdltest { |
michael@0 | 11 | |
michael@0 | 12 | |
michael@0 | 13 | class TestSyncHangParent : |
michael@0 | 14 | public PTestSyncHangParent |
michael@0 | 15 | { |
michael@0 | 16 | public: |
michael@0 | 17 | TestSyncHangParent(); |
michael@0 | 18 | virtual ~TestSyncHangParent(); |
michael@0 | 19 | |
michael@0 | 20 | static bool RunTestInProcesses() { return true; } |
michael@0 | 21 | // FIXME/bug 703323 Could work if modified |
michael@0 | 22 | static bool RunTestInThreads() { return false; } |
michael@0 | 23 | |
michael@0 | 24 | void Main(); |
michael@0 | 25 | |
michael@0 | 26 | protected: |
michael@0 | 27 | virtual void ActorDestroy(ActorDestroyReason why) MOZ_OVERRIDE |
michael@0 | 28 | { |
michael@0 | 29 | if (NormalShutdown != why) |
michael@0 | 30 | fail("unexpected destruction!"); |
michael@0 | 31 | passed("ok"); |
michael@0 | 32 | QuitParent(); |
michael@0 | 33 | } |
michael@0 | 34 | }; |
michael@0 | 35 | |
michael@0 | 36 | |
michael@0 | 37 | class TestSyncHangChild : |
michael@0 | 38 | public PTestSyncHangChild |
michael@0 | 39 | { |
michael@0 | 40 | public: |
michael@0 | 41 | TestSyncHangChild(); |
michael@0 | 42 | virtual ~TestSyncHangChild(); |
michael@0 | 43 | |
michael@0 | 44 | protected: |
michael@0 | 45 | virtual void ActorDestroy(ActorDestroyReason why) MOZ_OVERRIDE |
michael@0 | 46 | { |
michael@0 | 47 | if (NormalShutdown != why) |
michael@0 | 48 | fail("unexpected destruction!"); |
michael@0 | 49 | QuitChild(); |
michael@0 | 50 | } |
michael@0 | 51 | }; |
michael@0 | 52 | |
michael@0 | 53 | |
michael@0 | 54 | } // namespace _ipdltest |
michael@0 | 55 | } // namespace mozilla |
michael@0 | 56 | |
michael@0 | 57 | |
michael@0 | 58 | #endif // ifndef mozilla__ipdltest_TestSyncHang_h |