Wed, 31 Dec 2014 13:27:57 +0100
Ignore runtime configuration files generated during quality assurance.
michael@0 | 1 | #ifndef mozilla__ipdltest_TestOpens_h |
michael@0 | 2 | #define mozilla__ipdltest_TestOpens_h 1 |
michael@0 | 3 | |
michael@0 | 4 | #include "mozilla/_ipdltest/IPDLUnitTests.h" |
michael@0 | 5 | |
michael@0 | 6 | #include "mozilla/_ipdltest/PTestOpensParent.h" |
michael@0 | 7 | #include "mozilla/_ipdltest/PTestOpensChild.h" |
michael@0 | 8 | |
michael@0 | 9 | #include "mozilla/_ipdltest2/PTestOpensOpenedParent.h" |
michael@0 | 10 | #include "mozilla/_ipdltest2/PTestOpensOpenedChild.h" |
michael@0 | 11 | |
michael@0 | 12 | namespace mozilla { |
michael@0 | 13 | |
michael@0 | 14 | // parent process |
michael@0 | 15 | |
michael@0 | 16 | namespace _ipdltest { |
michael@0 | 17 | |
michael@0 | 18 | class TestOpensParent : public PTestOpensParent |
michael@0 | 19 | { |
michael@0 | 20 | public: |
michael@0 | 21 | TestOpensParent() {} |
michael@0 | 22 | virtual ~TestOpensParent() {} |
michael@0 | 23 | |
michael@0 | 24 | static bool RunTestInProcesses() { return true; } |
michael@0 | 25 | static bool RunTestInThreads() { return false; } |
michael@0 | 26 | |
michael@0 | 27 | void Main(); |
michael@0 | 28 | |
michael@0 | 29 | protected: |
michael@0 | 30 | virtual PTestOpensOpenedParent* |
michael@0 | 31 | AllocPTestOpensOpenedParent(Transport* transport, ProcessId otherProcess) MOZ_OVERRIDE; |
michael@0 | 32 | |
michael@0 | 33 | virtual void ActorDestroy(ActorDestroyReason why) MOZ_OVERRIDE; |
michael@0 | 34 | }; |
michael@0 | 35 | |
michael@0 | 36 | } // namespace _ipdltest |
michael@0 | 37 | |
michael@0 | 38 | namespace _ipdltest2 { |
michael@0 | 39 | |
michael@0 | 40 | class TestOpensOpenedParent : public PTestOpensOpenedParent |
michael@0 | 41 | { |
michael@0 | 42 | public: |
michael@0 | 43 | TestOpensOpenedParent(Transport* aTransport) |
michael@0 | 44 | : mTransport(aTransport) |
michael@0 | 45 | {} |
michael@0 | 46 | virtual ~TestOpensOpenedParent() {} |
michael@0 | 47 | |
michael@0 | 48 | protected: |
michael@0 | 49 | virtual bool RecvHello() MOZ_OVERRIDE; |
michael@0 | 50 | virtual bool RecvHelloSync() MOZ_OVERRIDE; |
michael@0 | 51 | virtual bool AnswerHelloRpc() MOZ_OVERRIDE; |
michael@0 | 52 | |
michael@0 | 53 | virtual void ActorDestroy(ActorDestroyReason why) MOZ_OVERRIDE; |
michael@0 | 54 | |
michael@0 | 55 | Transport* mTransport; |
michael@0 | 56 | }; |
michael@0 | 57 | |
michael@0 | 58 | } // namespace _ipdltest2 |
michael@0 | 59 | |
michael@0 | 60 | // child process |
michael@0 | 61 | |
michael@0 | 62 | namespace _ipdltest { |
michael@0 | 63 | |
michael@0 | 64 | class TestOpensChild : public PTestOpensChild |
michael@0 | 65 | { |
michael@0 | 66 | public: |
michael@0 | 67 | TestOpensChild(); |
michael@0 | 68 | virtual ~TestOpensChild() {} |
michael@0 | 69 | |
michael@0 | 70 | protected: |
michael@0 | 71 | virtual bool RecvStart() MOZ_OVERRIDE; |
michael@0 | 72 | |
michael@0 | 73 | virtual PTestOpensOpenedChild* |
michael@0 | 74 | AllocPTestOpensOpenedChild(Transport* transport, ProcessId otherProcess) MOZ_OVERRIDE; |
michael@0 | 75 | |
michael@0 | 76 | virtual void ActorDestroy(ActorDestroyReason why) MOZ_OVERRIDE; |
michael@0 | 77 | }; |
michael@0 | 78 | |
michael@0 | 79 | } // namespace _ipdltest |
michael@0 | 80 | |
michael@0 | 81 | namespace _ipdltest2 { |
michael@0 | 82 | |
michael@0 | 83 | class TestOpensOpenedChild : public PTestOpensOpenedChild |
michael@0 | 84 | { |
michael@0 | 85 | public: |
michael@0 | 86 | TestOpensOpenedChild(Transport* aTransport) |
michael@0 | 87 | : mGotHi(false) |
michael@0 | 88 | , mTransport(aTransport) |
michael@0 | 89 | {} |
michael@0 | 90 | virtual ~TestOpensOpenedChild() {} |
michael@0 | 91 | |
michael@0 | 92 | protected: |
michael@0 | 93 | virtual bool RecvHi() MOZ_OVERRIDE; |
michael@0 | 94 | virtual bool AnswerHiRpc() MOZ_OVERRIDE; |
michael@0 | 95 | |
michael@0 | 96 | virtual void ActorDestroy(ActorDestroyReason why) MOZ_OVERRIDE; |
michael@0 | 97 | |
michael@0 | 98 | bool mGotHi; |
michael@0 | 99 | Transport* mTransport; |
michael@0 | 100 | }; |
michael@0 | 101 | |
michael@0 | 102 | } // namespace _ipdltest2 |
michael@0 | 103 | |
michael@0 | 104 | } // namespace mozilla |
michael@0 | 105 | |
michael@0 | 106 | |
michael@0 | 107 | #endif // ifndef mozilla__ipdltest_TestOpens_h |