Bug 947575 - Fix IPDL unit tests on windows, r=bsmedberg.

--HG--
extra : transplant_source : %04B6%5C%3A%ED3E%06o%90%1Bx%60%96b.%0F%27P
This commit is contained in:
Ben Turner 2013-11-21 16:51:26 -08:00
parent 3c5caf6332
commit 9de016148a
5 changed files with 10 additions and 5 deletions

View File

@ -4128,7 +4128,7 @@ class _GenerateProtocolActorCode(ipdl.ast.Visitor):
msgvar = self.msgvar
tdvar = ExprVar('td')
pidvar = ExprVar('pid')
pvar = ExprVar('p')
pvar = ExprVar('protocolid')
iffail = StmtIf(ExprNot(ExprCall(
ExprVar('mozilla::ipc::UnpackChannelOpened'),
args=[ _backstagePass(),
@ -4180,7 +4180,7 @@ class _GenerateProtocolActorCode(ipdl.ast.Visitor):
StmtBreak()
])
label = _messageStartName(actor.ptype)
if actor.side is 'child':
if actor.side == 'child':
label += 'Child'
return CaseLabel(label), case

View File

@ -3,6 +3,8 @@ include protocol PTestActorPunningPunned;
include protocol PTestActorPunningSub;
include "mozilla/_ipdltest/IPDLUnitTestUtils.h";
using struct mozilla::_ipdltest::Bad from "mozilla/_ipdltest/IPDLUnitTestUtils.h";
namespace mozilla {
namespace _ipdltest {

View File

@ -1,3 +1,4 @@
include protocol PTestBridgeMainSub;
namespace mozilla {
namespace _ipdltest {

View File

@ -1,8 +1,9 @@
#include "TestRPC.h"
#include "IPDLUnitTests.h" // fail etc.
#if defined(OS_POSIX)
#include <unistd.h>
#if !defined(OS_POSIX)
#else
#include <windows.h>
#endif

View File

@ -1,8 +1,9 @@
#include "TestUrgency.h"
#include "IPDLUnitTests.h" // fail etc.
#if defined(OS_POSIX)
#include <unistd.h>
#if !defined(OS_POSIX)
#else
#include <windows.h>
#endif
@ -166,7 +167,7 @@ TestUrgencyChild::AnswerReply2(uint32_t *reply)
bool
TestUrgencyChild::AnswerFinalTest_Hang()
{
sleep(10);
Sleep(10);
return true;
}