/* Any copyright is dedicated to the Public Domain. * http://creativecommons.org/publicdomain/zero/1.0/ */ MARIONETTE_TIMEOUT = 60000; MARIONETTE_HEAD_JS = 'head.js'; const inNumber = "5555552222"; const inInfo = gInCallStrPool(inNumber); var inCall; startTest(function() { gRemoteDial(inNumber) .then(call => inCall = call) .then(() => gCheckAll(null, [inCall], "", [], [inInfo.incoming])) // Answer incoming call .then(() => gAnswer(inCall)) .then(() => gCheckAll(inCall, [inCall], "", [], [inInfo.active])) // Hang-up call .then(() => { let p1 = gHangUp(inCall); let p2 = gWaitForCallsChangedEvent(telephony, inCall); return Promise.all([p1, p2]); }) .then(() => gCheckAll(null, [], "", [], [])) .catch(error => ok(false, "Promise reject: " + error)) .then(finish); });