function restoreDirectory(id) {
  return new Promise(function(fulfill) {
    chrome.fileSystem.isRestorable(id, fulfill);
  }).then(function(restorable) {
    chrome.test.assertTrue(restorable);
    return new Promise(function(fulfill) {
      chrome.fileSystem.restoreEntry(id, fulfill);
    });
  }).then(function(directory) {
    chrome.test.assertTrue(!!directory);
    chrome.test.assertTrue(!!directory.isDirectory);
  });
}
/**
 * Restores a test directory.
 * @param {string} id ID of the test directory.
 * @return {Promise} Promise fulflled/rejected depending on the test result.
 */
Restores a test directory.
@param {string} id ID of the test directory.
@return {Promise} Promise fulflled/rejected depending on the test result.
Restores a test directory . @param { string } id ID of the test directory . @return { Promise } Promise fulflled / rejected depending on the test result .
function restoreDirectory(id) {
  return new Promise(function(fulfill) {
    chrome.fileSystem.isRestorable(id, fulfill);
  }).then(function(restorable) {
    chrome.test.assertTrue(restorable);
    return new Promise(function(fulfill) {
      chrome.fileSystem.restoreEntry(id, fulfill);
    });
  }).then(function(directory) {
    chrome.test.assertTrue(!!directory);
    chrome.test.assertTrue(!!directory.isDirectory);
  });
}
function restoreDirectory ( id ) { return new Promise ( function ( fulfill ) { chrome . fileSystem . isRestorable ( id , fulfill ) ; } ) . then ( function ( restorable ) { chrome . test . assertTrue ( restorable ) ; return new Promise ( function ( fulfill ) { chrome . fileSystem . restoreEntry ( id , fulfill ) ; } ) ; } ) . then ( function ( directory ) { chrome . test . assertTrue ( ! ! directory ) ; chrome . test . assertTrue ( ! ! directory . isDirectory ) ; } ) ; }
Restores a test directory.
Restores a test directory .