1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/dom/telephony/test/marionette/test_conference_two_hold_resume.js Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,42 @@ 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 testConferenceHoldAndResume() { 1.11 + log('= testConferenceHoldAndResume ='); 1.12 + 1.13 + let outCall; 1.14 + let inCall; 1.15 + let outNumber = "5555550101"; 1.16 + let inNumber = "5555550201"; 1.17 + let outInfo = gOutCallStrPool(outNumber); 1.18 + let inInfo = gInCallStrPool(inNumber); 1.19 + 1.20 + return Promise.resolve() 1.21 + .then(() => gSetupConferenceTwoCalls(outNumber, inNumber)) 1.22 + .then(calls => { 1.23 + [outCall, inCall] = calls; 1.24 + }) 1.25 + .then(() => gHoldConference([outCall, inCall], function() { 1.26 + gCheckState(null, [], 'held', [outCall, inCall]); 1.27 + })) 1.28 + .then(() => gCheckAll(null, [], 'held', [outCall, inCall], 1.29 + [outInfo.held, inInfo.held])) 1.30 + .then(() => gResumeConference([outCall, inCall], function() { 1.31 + gCheckState(conference, [], 'connected', [outCall, inCall]); 1.32 + })) 1.33 + .then(() => gCheckAll(conference, [], 'connected', [outCall, inCall], 1.34 + [outInfo.active, inInfo.active])) 1.35 + .then(() => gRemoteHangUpCalls([outCall, inCall])); 1.36 +} 1.37 + 1.38 +// Start the test 1.39 +startTest(function() { 1.40 + testConferenceHoldAndResume() 1.41 + .then(null, error => { 1.42 + ok(false, 'promise rejects during test.'); 1.43 + }) 1.44 + .then(finish); 1.45 +});