mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1051715 - Part 1: Add temporary clir test. r=hsinyi
This commit is contained in:
parent
07c5a3a821
commit
7fb6a60be9
@ -61,3 +61,4 @@ disabled = Bug 821958
|
||||
[test_outgoing_when_two_calls_on_line.js]
|
||||
[test_call_presentation.js]
|
||||
[test_incomingcall_phonestate_speaker.js]
|
||||
[test_temporary_clir.js]
|
||||
|
37
dom/telephony/test/marionette/test_temporary_clir.js
Normal file
37
dom/telephony/test/marionette/test_temporary_clir.js
Normal file
@ -0,0 +1,37 @@
|
||||
/* Any copyright is dedicated to the Public Domain.
|
||||
* http://creativecommons.org/publicdomain/zero/1.0/ */
|
||||
|
||||
MARIONETTE_TIMEOUT = 60000;
|
||||
MARIONETTE_HEAD_JS = 'head.js';
|
||||
|
||||
const clirPrefix = "*31#";
|
||||
const number = "0912345678";
|
||||
|
||||
startTest(function() {
|
||||
let outCall;
|
||||
|
||||
telephony.dial(clirPrefix + number).then(call => {
|
||||
outCall = call;
|
||||
|
||||
ok(call);
|
||||
is(call.id.number, number);
|
||||
is(call.state, "dialing");
|
||||
|
||||
let deferred = Promise.defer();
|
||||
|
||||
call.onalerting = function onalerting(event) {
|
||||
call.onalerting = null;
|
||||
log("Received 'onalerting' call event.");
|
||||
is(call.id.number, number);
|
||||
deferred.resolve(call);
|
||||
};
|
||||
|
||||
return deferred.promise;
|
||||
})
|
||||
.then(() => gRemoteHangUp(outCall))
|
||||
// End
|
||||
.then(null, error => {
|
||||
ok(false, 'promise rejects during test.');
|
||||
})
|
||||
.then(finish);
|
||||
});
|
Loading…
Reference in New Issue
Block a user