function renameDirectoryFromDirectoryTreeSuccessCase(useKeyboardShortcut) {
  var windowId;
  return setupForDirectoryTreeContextMenuTest().then(function(id) {
    windowId = id;
    return navigateWithDirectoryTree(windowId, '/photos');
  }).then(function() {
    return renamePhotosDirectoryTo(windowId, 'New photos', useKeyboardShortcut);
  }).then(function() {
    // Confirm that current directory has moved to new folder.
    return remoteCall.waitUntilCurrentDirectoryIsChanged(
        windowId, '/Downloads/New photos');
  });
}
/**
 * Renames directory and confirm current directory is moved to the renamed
 * directory.
 */
Renames directory and confirm current directory is moved to the renamed
directory.
Renames directory and confirm current directory is moved to the renamed directory .
function renameDirectoryFromDirectoryTreeSuccessCase(useKeyboardShortcut) {
  var windowId;
  return setupForDirectoryTreeContextMenuTest().then(function(id) {
    windowId = id;
    return navigateWithDirectoryTree(windowId, '/photos');
  }).then(function() {
    return renamePhotosDirectoryTo(windowId, 'New photos', useKeyboardShortcut);
  }).then(function() {
    return remoteCall.waitUntilCurrentDirectoryIsChanged(
        windowId, '/Downloads/New photos');
  });
}
function renameDirectoryFromDirectoryTreeSuccessCase ( useKeyboardShortcut ) { var windowId ; return setupForDirectoryTreeContextMenuTest ( ) . then ( function ( id ) { windowId = id ; return navigateWithDirectoryTree ( windowId , '/photos' ) ; } ) . then ( function ( ) { return renamePhotosDirectoryTo ( windowId , 'New photos' , useKeyboardShortcut ) ; } ) . then ( function ( ) { return remoteCall . waitUntilCurrentDirectoryIsChanged ( windowId , '/Downloads/New photos' ) ; } ) ; }
Renames directory and confirm current directory is moved to the renamed
 directory.
Renames directory and confirm current directory is moved to the renamed directory .
// Confirm that current directory has moved to new folder.