2013-07-03 07:37:33 +04:00
|
|
|
#ifndef mozilla__ipdltest_TestUrgency_h
|
|
|
|
#define mozilla__ipdltest_TestUrgency_h 1
|
|
|
|
|
|
|
|
#include "mozilla/_ipdltest/IPDLUnitTests.h"
|
|
|
|
|
|
|
|
#include "mozilla/_ipdltest/PTestUrgencyParent.h"
|
|
|
|
#include "mozilla/_ipdltest/PTestUrgencyChild.h"
|
|
|
|
|
|
|
|
namespace mozilla {
|
|
|
|
namespace _ipdltest {
|
|
|
|
|
|
|
|
|
|
|
|
class TestUrgencyParent :
|
|
|
|
public PTestUrgencyParent
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
TestUrgencyParent();
|
|
|
|
virtual ~TestUrgencyParent();
|
|
|
|
|
|
|
|
static bool RunTestInProcesses() { return true; }
|
2014-08-20 23:49:11 +04:00
|
|
|
static bool RunTestInThreads() { return false; }
|
2013-07-03 07:37:33 +04:00
|
|
|
|
|
|
|
void Main();
|
|
|
|
|
|
|
|
bool RecvTest1(uint32_t *value);
|
|
|
|
bool RecvTest2();
|
|
|
|
bool RecvTest3(uint32_t *value);
|
2013-08-13 03:21:54 +04:00
|
|
|
bool RecvTest4_Begin();
|
|
|
|
bool RecvTest4_NestedSync();
|
2013-08-27 08:56:57 +04:00
|
|
|
bool RecvFinalTest_Begin();
|
2013-07-03 07:37:33 +04:00
|
|
|
|
2015-03-21 19:28:04 +03:00
|
|
|
bool ShouldContinueFromReplyTimeout() override
|
2013-08-27 08:56:57 +04:00
|
|
|
{
|
|
|
|
return false;
|
|
|
|
}
|
2015-03-21 19:28:04 +03:00
|
|
|
virtual void ActorDestroy(ActorDestroyReason why) override
|
2013-07-03 07:37:33 +04:00
|
|
|
{
|
|
|
|
passed("ok");
|
|
|
|
QuitParent();
|
|
|
|
}
|
2013-08-27 08:56:57 +04:00
|
|
|
|
2013-07-03 07:37:33 +04:00
|
|
|
private:
|
|
|
|
bool inreply_;
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
class TestUrgencyChild :
|
|
|
|
public PTestUrgencyChild
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
TestUrgencyChild();
|
|
|
|
virtual ~TestUrgencyChild();
|
|
|
|
|
|
|
|
bool RecvStart();
|
2014-10-08 08:32:45 +04:00
|
|
|
bool RecvReply1(uint32_t *reply);
|
|
|
|
bool RecvReply2(uint32_t *reply);
|
2013-07-03 07:37:33 +04:00
|
|
|
|
2015-03-21 19:28:04 +03:00
|
|
|
virtual void ActorDestroy(ActorDestroyReason why) override
|
2013-07-03 07:37:33 +04:00
|
|
|
{
|
|
|
|
QuitChild();
|
|
|
|
}
|
|
|
|
|
|
|
|
private:
|
|
|
|
uint32_t test_;
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
} // namespace _ipdltest
|
|
|
|
} // namespace mozilla
|
|
|
|
|
|
|
|
|
|
|
|
#endif // ifndef mozilla__ipdltest_TestUrgency_h
|