function testRetainEntry() {
  new Promise(function(fulfill) {
    chrome.storage.local.get('id', fulfill);
  }).then(function(values) {
    if (!values.id)
      return retainDirectory();
    else
      return restoreDirectory(values.id).then(chrome.test.callbackPass());
  }).catch(function(error) {
    chrome.test.fail(error.stack || error);
  });
}
/**
 * Tests to retain and to restore directory on the drive.
 */
Tests to retain and to restore directory on the drive.
Tests to retain and to restore directory on the drive .
function testRetainEntry() {
  new Promise(function(fulfill) {
    chrome.storage.local.get('id', fulfill);
  }).then(function(values) {
    if (!values.id)
      return retainDirectory();
    else
      return restoreDirectory(values.id).then(chrome.test.callbackPass());
  }).catch(function(error) {
    chrome.test.fail(error.stack || error);
  });
}
function testRetainEntry ( ) { new Promise ( function ( fulfill ) { chrome . storage . local . get ( 'id' , fulfill ) ; } ) . then ( function ( values ) { if ( ! values . id ) return retainDirectory ( ) ; else return restoreDirectory ( values . id ) . then ( chrome . test . callbackPass ( ) ) ; } ) . catch ( function ( error ) { chrome . test . fail ( error . stack || error ) ; } ) ; }
Tests to retain and to restore directory on the drive.
Tests to retain and to restore directory on the drive .