|
1 #ifndef mozilla__ipdltest_TestInterruptErrorCleanup_h |
|
2 #define mozilla__ipdltest_TestInterruptErrorCleanup_h 1 |
|
3 |
|
4 #include "mozilla/_ipdltest/IPDLUnitTests.h" |
|
5 |
|
6 #include "mozilla/_ipdltest/PTestInterruptErrorCleanupParent.h" |
|
7 #include "mozilla/_ipdltest/PTestInterruptErrorCleanupChild.h" |
|
8 |
|
9 namespace mozilla { |
|
10 namespace _ipdltest { |
|
11 |
|
12 |
|
13 class TestInterruptErrorCleanupParent : |
|
14 public PTestInterruptErrorCleanupParent |
|
15 { |
|
16 public: |
|
17 TestInterruptErrorCleanupParent(); |
|
18 virtual ~TestInterruptErrorCleanupParent(); |
|
19 |
|
20 static bool RunTestInProcesses() { return true; } |
|
21 // FIXME/bug 703323 Could work if modified |
|
22 static bool RunTestInThreads() { return false; } |
|
23 |
|
24 void Main(); |
|
25 |
|
26 protected: |
|
27 virtual void ActorDestroy(ActorDestroyReason why) MOZ_OVERRIDE |
|
28 { |
|
29 if (AbnormalShutdown != why) |
|
30 fail("unexpected destruction!"); |
|
31 } |
|
32 |
|
33 virtual void ProcessingError(Result what) MOZ_OVERRIDE; |
|
34 |
|
35 bool mGotProcessingError; |
|
36 }; |
|
37 |
|
38 |
|
39 class TestInterruptErrorCleanupChild : |
|
40 public PTestInterruptErrorCleanupChild |
|
41 { |
|
42 public: |
|
43 TestInterruptErrorCleanupChild(); |
|
44 virtual ~TestInterruptErrorCleanupChild(); |
|
45 |
|
46 protected: |
|
47 virtual bool AnswerError() MOZ_OVERRIDE; |
|
48 |
|
49 virtual void ActorDestroy(ActorDestroyReason why) MOZ_OVERRIDE |
|
50 { |
|
51 fail("should have 'crashed'!"); |
|
52 } |
|
53 }; |
|
54 |
|
55 |
|
56 } // namespace _ipdltest |
|
57 } // namespace mozilla |
|
58 |
|
59 |
|
60 #endif // ifndef mozilla__ipdltest_TestInterruptErrorCleanup_h |