ipc/ipdl/test/cxx/TestInterruptErrorCleanup.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.

     1 #ifndef mozilla__ipdltest_TestInterruptErrorCleanup_h
     2 #define mozilla__ipdltest_TestInterruptErrorCleanup_h 1
     4 #include "mozilla/_ipdltest/IPDLUnitTests.h"
     6 #include "mozilla/_ipdltest/PTestInterruptErrorCleanupParent.h"
     7 #include "mozilla/_ipdltest/PTestInterruptErrorCleanupChild.h"
     9 namespace mozilla {
    10 namespace _ipdltest {
    13 class TestInterruptErrorCleanupParent :
    14     public PTestInterruptErrorCleanupParent
    15 {
    16 public:
    17     TestInterruptErrorCleanupParent();
    18     virtual ~TestInterruptErrorCleanupParent();
    20     static bool RunTestInProcesses() { return true; }
    21     // FIXME/bug 703323 Could work if modified
    22     static bool RunTestInThreads() { return false; }
    24     void Main();
    26 protected:    
    27     virtual void ActorDestroy(ActorDestroyReason why) MOZ_OVERRIDE
    28     {
    29         if (AbnormalShutdown != why)
    30             fail("unexpected destruction!");  
    31     }
    33     virtual void ProcessingError(Result what) MOZ_OVERRIDE;
    35     bool mGotProcessingError;
    36 };
    39 class TestInterruptErrorCleanupChild :
    40     public PTestInterruptErrorCleanupChild
    41 {
    42 public:
    43     TestInterruptErrorCleanupChild();
    44     virtual ~TestInterruptErrorCleanupChild();
    46 protected:
    47     virtual bool AnswerError() MOZ_OVERRIDE;
    49     virtual void ActorDestroy(ActorDestroyReason why) MOZ_OVERRIDE
    50     {
    51         fail("should have 'crashed'!");
    52     }
    53 };
    56 } // namespace _ipdltest
    57 } // namespace mozilla
    60 #endif // ifndef mozilla__ipdltest_TestInterruptErrorCleanup_h

mercurial