michael@0: /* Any copyright is dedicated to the Public Domain. michael@0: * http://creativecommons.org/publicdomain/zero/1.0/ */ michael@0: michael@0: MARIONETTE_TIMEOUT = 60000; michael@0: MARIONETTE_HEAD_JS = 'head.js'; michael@0: michael@0: function testConferenceHoldAndResume() { michael@0: log('= testConferenceHoldAndResume ='); michael@0: michael@0: let outCall; michael@0: let inCall; michael@0: let outNumber = "5555550101"; michael@0: let inNumber = "5555550201"; michael@0: let outInfo = gOutCallStrPool(outNumber); michael@0: let inInfo = gInCallStrPool(inNumber); michael@0: michael@0: return Promise.resolve() michael@0: .then(() => gSetupConferenceTwoCalls(outNumber, inNumber)) michael@0: .then(calls => { michael@0: [outCall, inCall] = calls; michael@0: }) michael@0: .then(() => gHoldConference([outCall, inCall], function() { michael@0: gCheckState(null, [], 'held', [outCall, inCall]); michael@0: })) michael@0: .then(() => gCheckAll(null, [], 'held', [outCall, inCall], michael@0: [outInfo.held, inInfo.held])) michael@0: .then(() => gResumeConference([outCall, inCall], function() { michael@0: gCheckState(conference, [], 'connected', [outCall, inCall]); michael@0: })) michael@0: .then(() => gCheckAll(conference, [], 'connected', [outCall, inCall], michael@0: [outInfo.active, inInfo.active])) michael@0: .then(() => gRemoteHangUpCalls([outCall, inCall])); michael@0: } michael@0: michael@0: // Start the test michael@0: startTest(function() { michael@0: testConferenceHoldAndResume() michael@0: .then(null, error => { michael@0: ok(false, 'promise rejects during test.'); michael@0: }) michael@0: .then(finish); michael@0: });