dom/telephony/test/marionette/test_conference_two_hangup_one.js

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/dom/telephony/test/marionette/test_conference_two_hangup_one.js	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,35 @@
     1.4 +/* Any copyright is dedicated to the Public Domain.
     1.5 + * http://creativecommons.org/publicdomain/zero/1.0/ */
     1.6 +
     1.7 +MARIONETTE_TIMEOUT = 60000;
     1.8 +MARIONETTE_HEAD_JS = 'head.js';
     1.9 +
    1.10 +function testConferenceTwoAndHangupOne() {
    1.11 +  log('= testConferenceTwoAndHangupOne =');
    1.12 +
    1.13 +  let outCall;
    1.14 +  let inCall;
    1.15 +  let outNumber = "5555550101";
    1.16 +  let inNumber  = "5555550201";
    1.17 +  let inInfo = gInCallStrPool(inNumber);
    1.18 +
    1.19 +  return Promise.resolve()
    1.20 +    .then(() => gSetupConferenceTwoCalls(outNumber, inNumber))
    1.21 +    .then(calls => {
    1.22 +      [outCall, inCall] = calls;
    1.23 +    })
    1.24 +    .then(() => gHangUpCallInConference(outCall, [inCall], [], function() {
    1.25 +      gCheckState(inCall, [inCall], '', []);
    1.26 +    }))
    1.27 +    .then(() => gCheckAll(inCall, [inCall], '', [], [inInfo.active]))
    1.28 +    .then(() => gRemoteHangUpCalls([inCall]));
    1.29 +}
    1.30 +
    1.31 +// Start the test
    1.32 +startTest(function() {
    1.33 +  testConferenceTwoAndHangupOne()
    1.34 +    .then(null, error => {
    1.35 +      ok(false, 'promise rejects during test.');
    1.36 +    })
    1.37 +    .then(finish);
    1.38 +});

mercurial