mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1001343 - Part 1: Create dialSTK() (head.js). r=aknow
This commit is contained in:
parent
f2779cc392
commit
4fb9a71a03
@ -486,6 +486,31 @@ let emulator = (function() {
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Simulate a call dialed out by STK directly.
|
||||
*
|
||||
* @param number
|
||||
* A string.
|
||||
* @return Promise<TelephonyCall>
|
||||
*/
|
||||
function dialSTK(number) {
|
||||
log("STK makes an outgoing call: " + number);
|
||||
|
||||
let p1 = waitForCallsChangedEvent(telephony);
|
||||
let p2 = emulator.runCmd("stk setupcall " + number);
|
||||
|
||||
return Promise.all([p1, p2])
|
||||
.then(result => {
|
||||
let call = result[0];
|
||||
|
||||
ok(call instanceof TelephonyCall, "check instance");
|
||||
is(call.id.number, number, "check number");
|
||||
is(call.state, "dialing", "check call state");
|
||||
|
||||
return waitForNamedStateEvent(call, "alerting");
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Answer an incoming call.
|
||||
*
|
||||
@ -1086,6 +1111,7 @@ let emulator = (function() {
|
||||
this.gSendMMI = sendMMI;
|
||||
this.gDial = dial;
|
||||
this.gDialEmergency = dialEmergency;
|
||||
this.gDialSTK = dialSTK;
|
||||
this.gAnswer = answer;
|
||||
this.gHangUp = hangUp;
|
||||
this.gHold = hold;
|
||||
|
Loading…
Reference in New Issue
Block a user