function testOpenSuggestAppsDialogFailure(callback) {
  var onFailureIsCalled = new Promise(function(resolve, reject) {
    var fileSystem = new MockFileSystem('volumeId');
    var entry = new MockFileEntry(fileSystem, '/test');

    FileTasks
        .create(
            {
              getDriveConnectionState: function() {
                return VolumeManagerCommon.DriveConnectionType.ONLINE;
              }
            },
            {}, {}, {
              taskMenuButton: document.createElement('button'),
              fileContextMenu:
                  {defaultActionMenuItem: document.createElement('div')}
            },
            [entry], [null], mockTaskHistory)
        .then(function(tasks) {
          tasks.openSuggestAppsDialog(function() {}, function() {}, resolve);
        });
  });

  reportPromise(onFailureIsCalled, callback);
}
/**
 * Test case for openSuggestAppsDialog with an entry which doesn't have
 * extension. Since both extension and MIME type are required for
 * openSuggestAppsDialogopen, onFalure should be called for this test case.
 */
Test case for openSuggestAppsDialog with an entry which doesn't have
extension. Since both extension and MIME type are required for
openSuggestAppsDialogopen, onFalure should be called for this test case.
Test case for openSuggestAppsDialog with an entry which doesn ' t have extension . Since both extension and MIME type are required for openSuggestAppsDialogopen onFalure should be called for this test case .
function testOpenSuggestAppsDialogFailure(callback) {
  var onFailureIsCalled = new Promise(function(resolve, reject) {
    var fileSystem = new MockFileSystem('volumeId');
    var entry = new MockFileEntry(fileSystem, '/test');
    FileTasks
        .create(
            {
              getDriveConnectionState: function() {
                return VolumeManagerCommon.DriveConnectionType.ONLINE;
              }
            },
            {}, {}, {
              taskMenuButton: document.createElement('button'),
              fileContextMenu:
                  {defaultActionMenuItem: document.createElement('div')}
            },
            [entry], [null], mockTaskHistory)
        .then(function(tasks) {
          tasks.openSuggestAppsDialog(function() {}, function() {}, resolve);
        });
  });
  reportPromise(onFailureIsCalled, callback);
}
function testOpenSuggestAppsDialogFailure ( callback ) { var onFailureIsCalled = new Promise ( function ( resolve , reject ) { var fileSystem = new MockFileSystem ( 'volumeId' ) ; var entry = new MockFileEntry ( fileSystem , '/test' ) ; FileTasks . create ( { getDriveConnectionState : function ( ) { return VolumeManagerCommon . DriveConnectionType . ONLINE ; } } , { } , { } , { taskMenuButton : document . createElement ( 'button' ) , fileContextMenu : { defaultActionMenuItem : document . createElement ( 'div' ) } } , [ entry ] , [ null ] , mockTaskHistory ) . then ( function ( tasks ) { tasks . openSuggestAppsDialog ( function ( ) { } , function ( ) { } , resolve ) ; } ) ; } ) ; reportPromise ( onFailureIsCalled , callback ) ; }
Test case for openSuggestAppsDialog with an entry which doesn't have
 extension.
Test case for openSuggestAppsDialog with an entry which doesn ' t have extension .