mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 849714 - Fix intermittent failure in outgoing_answer_hangup_oncallschanged; r=jgriffin
This commit is contained in:
parent
198d012d16
commit
76da970a99
@ -46,16 +46,10 @@ function dial() {
|
||||
is(outgoing.number, number);
|
||||
|
||||
is(outgoing, telephony.active);
|
||||
//ok(telephony.calls === calls); // bug 717414
|
||||
is(telephony.calls.length, 1);
|
||||
is(telephony.calls[0], outgoing);
|
||||
|
||||
runEmulatorCmd("gsm list", function(result) {
|
||||
log("Call list is now: " + result);
|
||||
is(result[0], "outbound to " + number + " : unknown");
|
||||
is(result[1], "OK");
|
||||
answer();
|
||||
});
|
||||
checkCallList();
|
||||
}
|
||||
|
||||
if (event.call.state == "disconnected") {
|
||||
@ -69,6 +63,17 @@ function dial() {
|
||||
telephony.dial(number);
|
||||
}
|
||||
|
||||
function checkCallList() {
|
||||
runEmulatorCmd("gsm list", function(result) {
|
||||
log("Call list is now: " + result)
|
||||
if ((result[0] == "outbound to " + number + " : unknown") && (result[1] == "OK")) {
|
||||
answer();
|
||||
} else {
|
||||
window.setTimeout(checkCallList, 100);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function answer() {
|
||||
log("Answering the outgoing call.");
|
||||
|
||||
@ -82,7 +87,7 @@ function answer() {
|
||||
is(outgoing, telephony.active);
|
||||
|
||||
runEmulatorCmd("gsm list", function(result) {
|
||||
log("Call list is now: " + result);
|
||||
log("Call list (after 'connected' event) is now: " + result);
|
||||
is(result[0], "outbound to " + number + " : active");
|
||||
is(result[1], "OK");
|
||||
hangUp();
|
||||
|
Loading…
Reference in New Issue
Block a user