function openFileDialogClickCancelButton(volume, name) {
  const type = {type: 'openFile'};

  const cancelButton = '.button-panel button.cancel';
  let closer = clickOpenFileDialogButton.bind(null, name, cancelButton);

  return createFileEntryPromise(volume)
      .then(function openFileDialog(entrySet) {
        return openAndWaitForClosingDialog(type, volume, entrySet, closer);
      })
      .then(function expectDialogCancelled(result) {
        chrome.test.assertEq(undefined, result);
      });
}
/**
 * Adds the basic file entry sets then opens the file dialog on the volume.
 * Once file |name| is shown, select it and click the Cancel button.
 *
 * @param {!string} volume Volume name for openAndWaitForClosingDialog.
 * @param {!string} name File name to select in the dialog.
 * @return {!Promise} Promise to be fulfilled on success.
 */
Adds the basic file entry sets then opens the file dialog on the volume.
Once file |name| is shown, select it and click the Cancel button.

@param {!string} volume Volume name for openAndWaitForClosingDialog.
@param {!string} name File name to select in the dialog.
@return {!Promise} Promise to be fulfilled on success.
Adds the basic file entry sets then opens the file dialog on the volume . Once file |name| is shown select it and click the Cancel button . @param { !string } volume Volume name for openAndWaitForClosingDialog . @param { !string } name File name to select in the dialog . @return { !Promise } Promise to be fulfilled on success .
function openFileDialogClickCancelButton(volume, name) {
  const type = {type: 'openFile'};
  const cancelButton = '.button-panel button.cancel';
  let closer = clickOpenFileDialogButton.bind(null, name, cancelButton);
  return createFileEntryPromise(volume)
      .then(function openFileDialog(entrySet) {
        return openAndWaitForClosingDialog(type, volume, entrySet, closer);
      })
      .then(function expectDialogCancelled(result) {
        chrome.test.assertEq(undefined, result);
      });
}
function openFileDialogClickCancelButton ( volume , name ) { const type = { type : 'openFile' } ; const cancelButton = '.button-panel button.cancel' ; let closer = clickOpenFileDialogButton . bind ( null , name , cancelButton ) ; return createFileEntryPromise ( volume ) . then ( function openFileDialog ( entrySet ) { return openAndWaitForClosingDialog ( type , volume , entrySet , closer ) ; } ) . then ( function expectDialogCancelled ( result ) { chrome . test . assertEq ( undefined , result ) ; } ) ; }
Adds the basic file entry sets then opens the file dialog on the volume.
Adds the basic file entry sets then opens the file dialog on the volume .