2009-10-06 11:05:47 -07:00
|
|
|
#ifndef mozilla__ipdltest_TestManyChildAllocs_h
|
|
|
|
#define mozilla__ipdltest_TestManyChildAllocs_h 1
|
|
|
|
|
2009-12-03 00:16:28 -08:00
|
|
|
#include "mozilla/_ipdltest/IPDLUnitTests.h"
|
|
|
|
|
2009-10-06 11:05:47 -07:00
|
|
|
#include "mozilla/_ipdltest/PTestManyChildAllocsParent.h"
|
|
|
|
#include "mozilla/_ipdltest/PTestManyChildAllocsChild.h"
|
|
|
|
|
|
|
|
#include "mozilla/_ipdltest/PTestManyChildAllocsSubParent.h"
|
|
|
|
#include "mozilla/_ipdltest/PTestManyChildAllocsSubChild.h"
|
|
|
|
|
|
|
|
namespace mozilla {
|
|
|
|
namespace _ipdltest {
|
|
|
|
|
|
|
|
// top-level protocol
|
|
|
|
|
|
|
|
class TestManyChildAllocsParent :
|
|
|
|
public PTestManyChildAllocsParent
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
TestManyChildAllocsParent();
|
|
|
|
virtual ~TestManyChildAllocsParent();
|
|
|
|
|
|
|
|
void Main();
|
|
|
|
|
|
|
|
protected:
|
2009-12-03 00:16:28 -08:00
|
|
|
NS_OVERRIDE
|
2009-10-06 11:05:47 -07:00
|
|
|
virtual bool RecvDone();
|
2009-12-03 00:16:28 -08:00
|
|
|
NS_OVERRIDE
|
2009-10-06 11:05:47 -07:00
|
|
|
virtual bool DeallocPTestManyChildAllocsSub(PTestManyChildAllocsSubParent* __a);
|
2009-12-03 00:16:28 -08:00
|
|
|
NS_OVERRIDE
|
2009-10-06 11:05:47 -07:00
|
|
|
virtual PTestManyChildAllocsSubParent* AllocPTestManyChildAllocsSub();
|
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:05:47 -07:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
class TestManyChildAllocsChild :
|
|
|
|
public PTestManyChildAllocsChild
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
TestManyChildAllocsChild();
|
|
|
|
virtual ~TestManyChildAllocsChild();
|
|
|
|
|
|
|
|
protected:
|
2009-12-03 00:16:28 -08:00
|
|
|
NS_OVERRIDE
|
2009-10-06 11:05:47 -07:00
|
|
|
virtual bool RecvGo();
|
2009-12-03 00:16:28 -08:00
|
|
|
NS_OVERRIDE
|
2009-10-06 11:05:47 -07:00
|
|
|
virtual bool DeallocPTestManyChildAllocsSub(PTestManyChildAllocsSubChild* __a);
|
2009-12-03 00:16:28 -08:00
|
|
|
NS_OVERRIDE
|
2009-10-06 11:05:47 -07:00
|
|
|
virtual PTestManyChildAllocsSubChild* AllocPTestManyChildAllocsSub();
|
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:05:47 -07:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
// do-nothing sub-protocol actors
|
|
|
|
|
|
|
|
class TestManyChildAllocsSubParent :
|
|
|
|
public PTestManyChildAllocsSubParent
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
TestManyChildAllocsSubParent() { }
|
|
|
|
virtual ~TestManyChildAllocsSubParent() { }
|
|
|
|
|
|
|
|
protected:
|
2009-12-03 00:16:28 -08:00
|
|
|
NS_OVERRIDE
|
2009-10-06 11:05:47 -07:00
|
|
|
virtual bool RecvHello() { return true; }
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
class TestManyChildAllocsSubChild :
|
|
|
|
public PTestManyChildAllocsSubChild
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
TestManyChildAllocsSubChild() { }
|
|
|
|
virtual ~TestManyChildAllocsSubChild() { }
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} // namepsace _ipdltest
|
|
|
|
} // namespace mozilla
|
|
|
|
|
|
|
|
|
|
|
|
#endif // ifndef mozilla__ipdltest_TestManyChildAllocs_h
|