B2G/gecko/testing/marionette/marionette-listener.js
/**
 * Function to start action chain on one finger 
 */
Function to start action chain on one finger
Function to start action chain on one finger
function actionChain(msg) {
  let command_id = msg.json.command_id;
  let args = msg.json.chain;
  let touchId = msg.json.nextId;
  try {
    let commandArray = elementManager.convertWrappedArguments(args, curWindow);
    if (touchId == null) {
      touchId = nextTouchId++;
    }
    if (!curWindow.document.createTouch) {
      mouseEventsOnly = true;
    }
    actions(commandArray, touchId, command_id);
  }
  catch (e) {
    sendError(e.message, e.code, e.stack, msg.json.command_id);
  }
}
function actionChain ( msg ) { let command_id = msg . json . command_id ; let args = msg . json . chain ; let touchId = msg . json . nextId ; try { let commandArray = elementManager . convertWrappedArguments ( args , curWindow ) ; if ( touchId == null ) { touchId = nextTouchId ++ ; } if ( ! curWindow . document . createTouch ) { mouseEventsOnly = true ; } actions ( commandArray , touchId , command_id ) ; } catch ( e ) { sendError ( e . message , e . code , e . stack , msg . json . command_id ) ; } }
Function to start action chain on one finger
Function to start action chain on one finger
// loop the action array [ ['press', id], ['move', id], ['release', id] ]