Wed, 31 Dec 2014 13:27:57 +0100
Ignore runtime configuration files generated during quality assurance.
1 #ifndef mozilla__ipdltest_TestSyncError_h
2 #define mozilla__ipdltest_TestSyncError_h 1
4 #include "mozilla/_ipdltest/IPDLUnitTests.h"
6 #include "mozilla/_ipdltest/PTestSyncErrorParent.h"
7 #include "mozilla/_ipdltest/PTestSyncErrorChild.h"
9 namespace mozilla {
10 namespace _ipdltest {
13 class TestSyncErrorParent :
14 public PTestSyncErrorParent
15 {
16 public:
17 TestSyncErrorParent();
18 virtual ~TestSyncErrorParent();
20 static bool RunTestInProcesses() { return true; }
21 static bool RunTestInThreads() { return true; }
23 void Main();
25 protected:
26 virtual bool RecvError() MOZ_OVERRIDE;
28 virtual void ProcessingError(Result what) MOZ_OVERRIDE
29 {
30 // Ignore errors
31 }
33 virtual void ActorDestroy(ActorDestroyReason why) MOZ_OVERRIDE
34 {
35 if (NormalShutdown != why)
36 fail("unexpected destruction!");
37 passed("ok");
38 QuitParent();
39 }
40 };
43 class TestSyncErrorChild :
44 public PTestSyncErrorChild
45 {
46 public:
47 TestSyncErrorChild();
48 virtual ~TestSyncErrorChild();
50 protected:
51 virtual bool RecvStart() MOZ_OVERRIDE;
53 virtual void ProcessingError(Result what) MOZ_OVERRIDE
54 {
55 // Ignore errors
56 }
58 virtual void ActorDestroy(ActorDestroyReason why) MOZ_OVERRIDE
59 {
60 if (NormalShutdown != why)
61 fail("unexpected destruction!");
62 QuitChild();
63 }
64 };
67 } // namespace _ipdltest
68 } // namespace mozilla
71 #endif // ifndef mozilla__ipdltest_TestSyncError_h