ipc/ipdl/test/cxx/TestActorPunning.h

Wed, 31 Dec 2014 13:27:57 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 13:27:57 +0100
branch
TOR_BUG_3246
changeset 6
8bccb770b82d
permissions
-rw-r--r--

Ignore runtime configuration files generated during quality assurance.

michael@0 1 #ifndef mozilla__ipdltest_TestActorPunning_h
michael@0 2 #define mozilla__ipdltest_TestActorPunning_h 1
michael@0 3
michael@0 4 #include "mozilla/_ipdltest/IPDLUnitTests.h"
michael@0 5
michael@0 6 #include "mozilla/_ipdltest/PTestActorPunningParent.h"
michael@0 7 #include "mozilla/_ipdltest/PTestActorPunningPunnedParent.h"
michael@0 8 #include "mozilla/_ipdltest/PTestActorPunningSubParent.h"
michael@0 9 #include "mozilla/_ipdltest/PTestActorPunningChild.h"
michael@0 10 #include "mozilla/_ipdltest/PTestActorPunningPunnedChild.h"
michael@0 11 #include "mozilla/_ipdltest/PTestActorPunningSubChild.h"
michael@0 12
michael@0 13 namespace mozilla {
michael@0 14 namespace _ipdltest {
michael@0 15
michael@0 16
michael@0 17 class TestActorPunningParent :
michael@0 18 public PTestActorPunningParent
michael@0 19 {
michael@0 20 public:
michael@0 21 static bool RunTestInProcesses() { return true; }
michael@0 22 static bool RunTestInThreads() { return false; }
michael@0 23
michael@0 24 void Main();
michael@0 25
michael@0 26 protected:
michael@0 27 PTestActorPunningPunnedParent* AllocPTestActorPunningPunnedParent() MOZ_OVERRIDE;
michael@0 28 bool DeallocPTestActorPunningPunnedParent(PTestActorPunningPunnedParent* a) MOZ_OVERRIDE;
michael@0 29
michael@0 30 PTestActorPunningSubParent* AllocPTestActorPunningSubParent() MOZ_OVERRIDE;
michael@0 31 bool DeallocPTestActorPunningSubParent(PTestActorPunningSubParent* a) MOZ_OVERRIDE;
michael@0 32
michael@0 33 virtual bool RecvPun(PTestActorPunningSubParent* a, const Bad& bad) MOZ_OVERRIDE;
michael@0 34
michael@0 35 virtual void ActorDestroy(ActorDestroyReason why) MOZ_OVERRIDE
michael@0 36 {
michael@0 37 if (NormalShutdown == why)
michael@0 38 fail("should have died from error!");
michael@0 39 passed("ok");
michael@0 40 QuitParent();
michael@0 41 }
michael@0 42 };
michael@0 43
michael@0 44 class TestActorPunningPunnedParent :
michael@0 45 public PTestActorPunningPunnedParent
michael@0 46 {
michael@0 47 public:
michael@0 48 TestActorPunningPunnedParent() {}
michael@0 49 virtual ~TestActorPunningPunnedParent() {}
michael@0 50 };
michael@0 51
michael@0 52 class TestActorPunningSubParent :
michael@0 53 public PTestActorPunningSubParent
michael@0 54 {
michael@0 55 public:
michael@0 56 TestActorPunningSubParent() {}
michael@0 57 virtual ~TestActorPunningSubParent() {}
michael@0 58 };
michael@0 59
michael@0 60
michael@0 61 class TestActorPunningChild :
michael@0 62 public PTestActorPunningChild
michael@0 63 {
michael@0 64 public:
michael@0 65 TestActorPunningChild() {}
michael@0 66 virtual ~TestActorPunningChild() {}
michael@0 67
michael@0 68 protected:
michael@0 69 PTestActorPunningPunnedChild* AllocPTestActorPunningPunnedChild() MOZ_OVERRIDE;
michael@0 70 bool DeallocPTestActorPunningPunnedChild(PTestActorPunningPunnedChild* a) MOZ_OVERRIDE;
michael@0 71
michael@0 72 PTestActorPunningSubChild* AllocPTestActorPunningSubChild() MOZ_OVERRIDE;
michael@0 73 bool DeallocPTestActorPunningSubChild(PTestActorPunningSubChild* a) MOZ_OVERRIDE;
michael@0 74
michael@0 75 virtual bool RecvStart() MOZ_OVERRIDE;
michael@0 76
michael@0 77 virtual void ActorDestroy(ActorDestroyReason why) MOZ_OVERRIDE
michael@0 78 {
michael@0 79 fail("should have been killed off!");
michael@0 80 }
michael@0 81 };
michael@0 82
michael@0 83 class TestActorPunningPunnedChild :
michael@0 84 public PTestActorPunningPunnedChild
michael@0 85 {
michael@0 86 public:
michael@0 87 TestActorPunningPunnedChild() {}
michael@0 88 virtual ~TestActorPunningPunnedChild() {}
michael@0 89 };
michael@0 90
michael@0 91 class TestActorPunningSubChild :
michael@0 92 public PTestActorPunningSubChild
michael@0 93 {
michael@0 94 public:
michael@0 95 TestActorPunningSubChild() {}
michael@0 96 virtual ~TestActorPunningSubChild() {}
michael@0 97
michael@0 98 virtual bool RecvBad() MOZ_OVERRIDE;
michael@0 99 };
michael@0 100
michael@0 101
michael@0 102 } // namespace _ipdltest
michael@0 103 } // namespace mozilla
michael@0 104
michael@0 105
michael@0 106 #endif // ifndef mozilla__ipdltest_TestActorPunning_h

mercurial