ipc/ipdl/test/cxx/TestSanity.h

Wed, 31 Dec 2014 06:09:35 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:09:35 +0100
changeset 0
6474c204b198
permissions
-rw-r--r--

Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.

     1 #ifndef mozilla__ipdltest_TestSanity_h
     2 #define mozilla__ipdltest_TestSanity_h 1
     4 #include "mozilla/_ipdltest/IPDLUnitTests.h"
     6 #include "mozilla/_ipdltest/PTestSanityParent.h"
     7 #include "mozilla/_ipdltest/PTestSanityChild.h"
     9 namespace mozilla {
    10 namespace _ipdltest {
    13 class TestSanityParent :
    14     public PTestSanityParent
    15 {
    16 public:
    17     TestSanityParent();
    18     virtual ~TestSanityParent();
    20     static bool RunTestInProcesses() { return true; }
    21     static bool RunTestInThreads() { return true; }
    23     void Main();
    25 protected:    
    26     virtual bool RecvPong(const int& one, const float& zeroPtTwoFive,
    27                           const uint8_t& dummy) MOZ_OVERRIDE;
    29     virtual void ActorDestroy(ActorDestroyReason why) MOZ_OVERRIDE
    30     {
    31         if (NormalShutdown != why)
    32             fail("unexpected destruction!");  
    33         passed("ok");
    34         QuitParent();
    35     }
    36 };
    39 class TestSanityChild :
    40     public PTestSanityChild
    41 {
    42 public:
    43     TestSanityChild();
    44     virtual ~TestSanityChild();
    46 protected:
    47     virtual bool RecvPing(const int& zero, const float& zeroPtFive,
    48                           const int8_t& dummy) MOZ_OVERRIDE;
    50     virtual void ActorDestroy(ActorDestroyReason why) MOZ_OVERRIDE
    51     {
    52         if (NormalShutdown != why)
    53             fail("unexpected destruction!");
    54         QuitChild();
    55     }
    56 };
    59 } // namespace _ipdltest
    60 } // namespace mozilla
    63 #endif // ifndef mozilla__ipdltest_TestSanity_h

mercurial