2009-10-06 11:02:26 -07:00
|
|
|
#ifndef mozilla__ipdltest_TestSanity_h
|
|
|
|
#define mozilla__ipdltest_TestSanity_h 1
|
|
|
|
|
2009-12-03 00:16:28 -08:00
|
|
|
#include "mozilla/_ipdltest/IPDLUnitTests.h"
|
2009-10-06 11:02:26 -07:00
|
|
|
|
|
|
|
#include "mozilla/_ipdltest/PTestSanityParent.h"
|
|
|
|
#include "mozilla/_ipdltest/PTestSanityChild.h"
|
|
|
|
|
|
|
|
namespace mozilla {
|
|
|
|
namespace _ipdltest {
|
|
|
|
|
|
|
|
|
|
|
|
class TestSanityParent :
|
|
|
|
public PTestSanityParent
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
TestSanityParent();
|
|
|
|
virtual ~TestSanityParent();
|
|
|
|
|
|
|
|
void Main();
|
|
|
|
|
|
|
|
protected:
|
2009-12-03 00:16:28 -08:00
|
|
|
NS_OVERRIDE
|
2010-01-25 14:47:39 -08:00
|
|
|
virtual bool RecvPong(const int& one, const float& zeroPtTwoFive,
|
2010-01-25 15:18:11 -08:00
|
|
|
const PRUint8& dummy);
|
2009-12-03 00:16:28 -08:00
|
|
|
|
|
|
|
NS_OVERRIDE
|
|
|
|
virtual void ActorDestroy(ActorDestroyReason why)
|
|
|
|
{
|
|
|
|
if (NormalShutdown != why)
|
|
|
|
fail("unexpected destruction!");
|
|
|
|
passed("ok");
|
|
|
|
QuitParent();
|
|
|
|
}
|
2009-10-06 11:02:26 -07:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
class TestSanityChild :
|
|
|
|
public PTestSanityChild
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
TestSanityChild();
|
|
|
|
virtual ~TestSanityChild();
|
|
|
|
|
|
|
|
protected:
|
2009-12-03 00:16:28 -08:00
|
|
|
NS_OVERRIDE
|
2010-01-25 14:47:39 -08:00
|
|
|
virtual bool RecvPing(const int& zero, const float& zeroPtFive,
|
2010-01-25 15:18:11 -08:00
|
|
|
const PRInt8& dummy);
|
2009-12-03 00:16:28 -08:00
|
|
|
|
|
|
|
NS_OVERRIDE
|
|
|
|
virtual void ActorDestroy(ActorDestroyReason why)
|
|
|
|
{
|
|
|
|
if (NormalShutdown != why)
|
|
|
|
fail("unexpected destruction!");
|
|
|
|
QuitChild();
|
|
|
|
}
|
2009-10-06 11:02:26 -07:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
} // namespace _ipdltest
|
|
|
|
} // namespace mozilla
|
|
|
|
|
|
|
|
|
|
|
|
#endif // ifndef mozilla__ipdltest_TestSanity_h
|