ipc/ipdl/test/cxx/TestSyncError.cpp

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

mercurial