function testProvidedEntryWithError(callback) {
  providedFileSystem.entries['/test'] =
      new MockDirectoryEntry(providedFileSystem, '/test', {});

  chrome.fileManagerPrivate.getCustomActions = function(entries, callback) {
    chrome.runtime.lastError = {
      message: 'Failed to fetch custom actions.'
    };
    callback(null);
  };

  var model = new ActionsModel(volumeManager, metadataModel, shortcutsModel,
      driveSyncHandler, ui, [providedFileSystem.entries['/test']]);
  return reportPromise(model.initialize().then(function() {
    var actions = model.getActions();
    assertEquals(0, Object.keys(actions).length);
  }), callback);
}
/**
 * Tests that no actions are available when getCustomActions() throws an error.
 */
Tests that no actions are available when getCustomActions() throws an error.
Tests that no actions are available when getCustomActions () throws an error .
function testProvidedEntryWithError(callback) {
  providedFileSystem.entries['/test'] =
      new MockDirectoryEntry(providedFileSystem, '/test', {});
  chrome.fileManagerPrivate.getCustomActions = function(entries, callback) {
    chrome.runtime.lastError = {
      message: 'Failed to fetch custom actions.'
    };
    callback(null);
  };
  var model = new ActionsModel(volumeManager, metadataModel, shortcutsModel,
      driveSyncHandler, ui, [providedFileSystem.entries['/test']]);
  return reportPromise(model.initialize().then(function() {
    var actions = model.getActions();
    assertEquals(0, Object.keys(actions).length);
  }), callback);
}
function testProvidedEntryWithError ( callback ) { providedFileSystem . entries [ '/test' ] = new MockDirectoryEntry ( providedFileSystem , '/test' , { } ) ; chrome . fileManagerPrivate . getCustomActions = function ( entries , callback ) { chrome . runtime . lastError = { message : 'Failed to fetch custom actions.' } ; callback ( null ) ; } ; var model = new ActionsModel ( volumeManager , metadataModel , shortcutsModel , driveSyncHandler , ui , [ providedFileSystem . entries [ '/test' ] ] ) ; return reportPromise ( model . initialize ( ) . then ( function ( ) { var actions = model . getActions ( ) ; assertEquals ( 0 , Object . keys ( actions ) . length ) ; } ) , callback ) ; }
Tests that no actions are available when getCustomActions() throws an error.
Tests that no actions are available when getCustomActions () throws an error .