ipc/ipdl/test/cxx/TestSyncError.cpp

changeset 0
6474c204b198
equal deleted inserted replaced
-1:000000000000 0:41a111b9a760
1 #include "TestSyncError.h"
2
3 #include "IPDLUnitTests.h" // fail etc.
4
5 namespace mozilla {
6 namespace _ipdltest {
7
8 //-----------------------------------------------------------------------------
9 // parent
10
11 TestSyncErrorParent::TestSyncErrorParent()
12 {
13 MOZ_COUNT_CTOR(TestSyncErrorParent);
14 }
15
16 TestSyncErrorParent::~TestSyncErrorParent()
17 {
18 MOZ_COUNT_DTOR(TestSyncErrorParent);
19 }
20
21 void
22 TestSyncErrorParent::Main()
23 {
24 if (!SendStart())
25 fail("sending Start");
26 }
27
28 bool
29 TestSyncErrorParent::RecvError()
30 {
31 return false;
32 }
33
34
35 //-----------------------------------------------------------------------------
36 // child
37
38 TestSyncErrorChild::TestSyncErrorChild()
39 {
40 MOZ_COUNT_CTOR(TestSyncErrorChild);
41 }
42
43 TestSyncErrorChild::~TestSyncErrorChild()
44 {
45 MOZ_COUNT_DTOR(TestSyncErrorChild);
46 }
47
48 bool
49 TestSyncErrorChild::RecvStart()
50 {
51 if (SendError())
52 fail("Error() should have return false");
53
54 Close();
55
56 return true;
57 }
58
59
60 } // namespace _ipdltest
61 } // namespace mozilla

mercurial