ipc/ipdl/test/cxx/TestSyncHang.h

changeset 0
6474c204b198
equal deleted inserted replaced
-1:000000000000 0:54ba7b4bae13
1 #ifndef mozilla__ipdltest_TestSyncHang_h
2 #define mozilla__ipdltest_TestSyncHang_h 1
3
4 #include "mozilla/_ipdltest/IPDLUnitTests.h"
5
6 #include "mozilla/_ipdltest/PTestSyncHangParent.h"
7 #include "mozilla/_ipdltest/PTestSyncHangChild.h"
8
9 namespace mozilla {
10 namespace _ipdltest {
11
12
13 class TestSyncHangParent :
14 public PTestSyncHangParent
15 {
16 public:
17 TestSyncHangParent();
18 virtual ~TestSyncHangParent();
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 (NormalShutdown != why)
30 fail("unexpected destruction!");
31 passed("ok");
32 QuitParent();
33 }
34 };
35
36
37 class TestSyncHangChild :
38 public PTestSyncHangChild
39 {
40 public:
41 TestSyncHangChild();
42 virtual ~TestSyncHangChild();
43
44 protected:
45 virtual void ActorDestroy(ActorDestroyReason why) MOZ_OVERRIDE
46 {
47 if (NormalShutdown != why)
48 fail("unexpected destruction!");
49 QuitChild();
50 }
51 };
52
53
54 } // namespace _ipdltest
55 } // namespace mozilla
56
57
58 #endif // ifndef mozilla__ipdltest_TestSyncHang_h

mercurial