B2G/gecko/dom/telephony/test/marionette/test_outgoing_already_held.js
// Hang-up the remaining (outgoing) call
Hang-up the remaining (outgoing) call
Hang - up the remaining ( outgoing ) call
function hangUpOutgoing() {
  log("Hanging up the remaining (outgoing) call.");
  let gotDisconnecting = false;
  outgoingCall.ondisconnecting = function ondisconnectingOut(event) {
    log("Received 'disconnecting' call event for remaining (outgoing) call.");
    is(outgoingCall, event.call);
    is(outgoingCall.state, "disconnecting");
    gotDisconnecting = true;
  };
  outgoingCall.ondisconnected = function ondisconnectedOut(event) {
    log("Received 'disconnected' call event for remaining (outgoing) call.");
    is(outgoingCall, event.call);
    is(outgoingCall.state, "disconnected");
    ok(gotDisconnecting);
    is(telephony.active, null);
    is(telephony.calls.length, 0);
    runEmulatorCmd("gsm list", function(result) {
      log("Call list is now: " + result);
      is(result[0], "OK");
      cleanUp();
    });
  };
  outgoingCall.hangUp();  
}
function hangUpOutgoing ( ) { log ( "Hanging up the remaining (outgoing) call." ) ; let gotDisconnecting = false ; outgoingCall . ondisconnecting = function ondisconnectingOut ( event ) { log ( "Received 'disconnecting' call event for remaining (outgoing) call." ) ; is ( outgoingCall , event . call ) ; is ( outgoingCall . state , "disconnecting" ) ; gotDisconnecting = true ; } ; outgoingCall . ondisconnected = function ondisconnectedOut ( event ) { log ( "Received 'disconnected' call event for remaining (outgoing) call." ) ; is ( outgoingCall , event . call ) ; is ( outgoingCall . state , "disconnected" ) ; ok ( gotDisconnecting ) ; is ( telephony . active , null ) ; is ( telephony . calls . length , 0 ) ; runEmulatorCmd ( "gsm list" , function ( result ) { log ( "Call list is now: " + result ) ; is ( result [ 0 ] , "OK" ) ; cleanUp ( ) ; } ) ; } ; outgoingCall . hangUp ( ) ; }
Hang-up the remaining (outgoing) call
Hang - up the remaining ( outgoing ) call
// Now no calls