зеркало из https://github.com/mozilla/gecko-dev.git
Bug 849714 - Fix intermittent failure in outgoing_answer_hangup_oncallschanged; r=jgriffin
This commit is contained in:
Родитель
f671a4bf5f
Коммит
eac6ee0371
|
@ -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();
|
||||
|
|
Загрузка…
Ссылка в новой задаче