B2G/gecko/dom/telephony/test/marionette/test_outgoing_already_held.js
// Put the original (incoming) call on hold
Put the original (incoming) call on hold
Put the original ( incoming ) call on hold
function holdCall(){
  log("Putting the original (incoming) call on hold.");
  let gotHolding = false;
  incomingCall.onholding = function onholding(event) {
    log("Received 'holding' call event");
    is(incomingCall, event.call);
    is(incomingCall.state, "holding");
    gotHolding = true;
  };
  incomingCall.onheld = function onheld(event) {
    log("Received 'held' call event");
    is(incomingCall, event.call);
    is(incomingCall.state, "held");
    ok(gotHolding);
    is(telephony.active, null);
    is(telephony.calls.length, 1);
    is(telephony.calls[0], incomingCall);
    runEmulatorCmd("gsm list", function(result) {
      log("Call list is now: " + result);
      is(result[0], "inbound from " + inNumber + " : held");
      is(result[1], "OK");   
      dial();
    });
  };
  incomingCall.hold();
}
function holdCall ( ) { log ( "Putting the original (incoming) call on hold." ) ; let gotHolding = false ; incomingCall . onholding = function onholding ( event ) { log ( "Received 'holding' call event" ) ; is ( incomingCall , event . call ) ; is ( incomingCall . state , "holding" ) ; gotHolding = true ; } ; incomingCall . onheld = function onheld ( event ) { log ( "Received 'held' call event" ) ; is ( incomingCall , event . call ) ; is ( incomingCall . state , "held" ) ; ok ( gotHolding ) ; is ( telephony . active , null ) ; is ( telephony . calls . length , 1 ) ; is ( telephony . calls [ 0 ] , incomingCall ) ; runEmulatorCmd ( "gsm list" , function ( result ) { log ( "Call list is now: " + result ) ; is ( result [ 0 ] , "inbound from " + inNumber + " : held" ) ; is ( result [ 1 ] , "OK" ) ; dial ( ) ; } ) ; } ; incomingCall . hold ( ) ; }
Put the original (incoming) call on hold
Put the original ( incoming ) call on hold