mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1043165 - Part 4: Update test cases. r=hsinyi
This commit is contained in:
parent
db4f71d9c4
commit
eeaf722057
@ -11,32 +11,38 @@ let inCall;
|
||||
function incoming() {
|
||||
return gRemoteDial(inNumber)
|
||||
.then(call => inCall = call)
|
||||
.then(() => gCheckAll(null, [inCall], "", [], [inInfo.incoming]));
|
||||
.then(() => gCheckAll(null, [inCall], "", [], [inInfo.incoming]))
|
||||
.then(() => is(inCall.disconnectedReason, null));
|
||||
}
|
||||
|
||||
function answer() {
|
||||
return gAnswer(inCall)
|
||||
.then(() => gCheckAll(inCall, [inCall], "", [], [inInfo.active]));
|
||||
.then(() => gCheckAll(inCall, [inCall], "", [], [inInfo.active]))
|
||||
.then(() => is(inCall.disconnectedReason, null));
|
||||
}
|
||||
|
||||
function hold() {
|
||||
return gHold(inCall)
|
||||
.then(() => gCheckAll(null, [inCall], "", [], [inInfo.held]));
|
||||
.then(() => gCheckAll(null, [inCall], "", [], [inInfo.held]))
|
||||
.then(() => is(inCall.disconnectedReason, null));
|
||||
}
|
||||
|
||||
function resume() {
|
||||
return gResume(inCall)
|
||||
.then(() => gCheckAll(inCall, [inCall], "", [], [inInfo.active]));
|
||||
.then(() => gCheckAll(inCall, [inCall], "", [], [inInfo.active]))
|
||||
.then(() => is(inCall.disconnectedReason, null));
|
||||
}
|
||||
|
||||
function hangUp() {
|
||||
return gHangUp(inCall)
|
||||
.then(() => gCheckAll(null, [], "", [], []));
|
||||
.then(() => gCheckAll(null, [], "", [], []))
|
||||
.then(() => is(inCall.disconnectedReason, "NormalCallClearing"));
|
||||
}
|
||||
|
||||
function remoteHangUp() {
|
||||
return gRemoteHangUp(inCall)
|
||||
.then(() => gCheckAll(null, [], "", [], []));
|
||||
.then(() => gCheckAll(null, [], "", [], []))
|
||||
.then(() => is(inCall.disconnectedReason, "NormalCallClearing"));
|
||||
}
|
||||
|
||||
// Test cases.
|
||||
|
@ -27,6 +27,7 @@ function testDialOutInvalidNumber() {
|
||||
is(event.call, outCall);
|
||||
ok(event.call.error);
|
||||
is(event.call.error.name, "BadNumberError");
|
||||
is(event.call.disconnectedReason, "BadNumber");
|
||||
})
|
||||
.then(() => gCheckAll(null, [], "", [], []));
|
||||
});
|
||||
|
@ -11,32 +11,38 @@ let outCall;
|
||||
function outgoing() {
|
||||
return gDial(outNumber)
|
||||
.then(call => outCall = call)
|
||||
.then(() => gCheckAll(outCall, [outCall], "", [], [outInfo.ringing]));
|
||||
.then(() => gCheckAll(outCall, [outCall], "", [], [outInfo.ringing]))
|
||||
.then(() => is(outCall.disconnectedReason, null));
|
||||
}
|
||||
|
||||
function answer() {
|
||||
return gRemoteAnswer(outCall)
|
||||
.then(() => gCheckAll(outCall, [outCall], "", [], [outInfo.active]));
|
||||
.then(() => gCheckAll(outCall, [outCall], "", [], [outInfo.active]))
|
||||
.then(() => is(outCall.disconnectedReason, null));
|
||||
}
|
||||
|
||||
function hangUp() {
|
||||
return gHangUp(outCall)
|
||||
.then(() => gCheckAll(null, [], "", [], []));
|
||||
.then(() => gCheckAll(null, [], "", [], []))
|
||||
.then(() => is(outCall.disconnectedReason, "NormalCallClearing"));
|
||||
}
|
||||
|
||||
function remoteHangUp() {
|
||||
return gRemoteHangUp(outCall)
|
||||
.then(() => gCheckAll(null, [], "", [], []));
|
||||
.then(() => gCheckAll(null, [], "", [], []))
|
||||
.then(() => is(outCall.disconnectedReason, "NormalCallClearing"));
|
||||
}
|
||||
|
||||
function hold() {
|
||||
return gHold(outCall)
|
||||
.then(() => gCheckAll(null, [outCall], "", [], [outInfo.held]));
|
||||
.then(() => gCheckAll(null, [outCall], "", [], [outInfo.held]))
|
||||
.then(() => is(outCall.disconnectedReason, null));
|
||||
}
|
||||
|
||||
function resume() {
|
||||
return gResume(outCall)
|
||||
.then(() => gCheckAll(outCall, [outCall], "", [], [outInfo.active]));
|
||||
.then(() => gCheckAll(outCall, [outCall], "", [], [outInfo.active]))
|
||||
.then(() => is(outCall.disconnectedReason, null));
|
||||
}
|
||||
|
||||
// Test cases.
|
||||
|
@ -17,6 +17,7 @@ startTest(function() {
|
||||
.then(event => {
|
||||
is(event.call, outCall);
|
||||
is(event.call.error.name, "BusyError");
|
||||
is(event.call.disconnectedReason, "Busy");
|
||||
});
|
||||
let p2 = emulator.runCmd("gsm busy " + outNumber);
|
||||
return Promise.all([p1, p2]);
|
||||
|
Loading…
Reference in New Issue
Block a user