function renamePhotosDirectoryTo(windowId, newName, useKeyboardShortcut) {
  return (useKeyboardShortcut ?
      remoteCall.callRemoteTestUtil(
          'fakeKeyDown', windowId,
          ['body', 'Enter', 'Enter', true /* ctrl */, false, false]) :
      clickDirectoryTreeContextMenuItem(windowId, '/photos', 'rename')
      ).then(function() {
    return remoteCall.waitForElement(windowId, '.tree-row > input');
  }).then(function() {
    return remoteCall.callRemoteTestUtil(
        'inputText', windowId, ['.tree-row > input', newName]);
  }).then(function() {
    return remoteCall.callRemoteTestUtil(
        'fakeKeyDown', windowId,
        ['.tree-row > input', 'Enter', 'Enter', false, false, false]);
  });
}
/**
 * Rename photos directory to specified name by using directory tree.
 */
Rename photos directory to specified name by using directory tree.
Rename photos directory to specified name by using directory tree .
function renamePhotosDirectoryTo(windowId, newName, useKeyboardShortcut) {
  return (useKeyboardShortcut ?
      remoteCall.callRemoteTestUtil(
          'fakeKeyDown', windowId,
          ['body', 'Enter', 'Enter', true , false, false]) :
      clickDirectoryTreeContextMenuItem(windowId, '/photos', 'rename')
      ).then(function() {
    return remoteCall.waitForElement(windowId, '.tree-row > input');
  }).then(function() {
    return remoteCall.callRemoteTestUtil(
        'inputText', windowId, ['.tree-row > input', newName]);
  }).then(function() {
    return remoteCall.callRemoteTestUtil(
        'fakeKeyDown', windowId,
        ['.tree-row > input', 'Enter', 'Enter', false, false, false]);
  });
}
function renamePhotosDirectoryTo ( windowId , newName , useKeyboardShortcut ) { return ( useKeyboardShortcut ? remoteCall . callRemoteTestUtil ( 'fakeKeyDown' , windowId , [ 'body' , 'Enter' , 'Enter' , true , false , false ] ) : clickDirectoryTreeContextMenuItem ( windowId , '/photos' , 'rename' ) ) . then ( function ( ) { return remoteCall . waitForElement ( windowId , '.tree-row > input' ) ; } ) . then ( function ( ) { return remoteCall . callRemoteTestUtil ( 'inputText' , windowId , [ '.tree-row > input' , newName ] ) ; } ) . then ( function ( ) { return remoteCall . callRemoteTestUtil ( 'fakeKeyDown' , windowId , [ '.tree-row > input' , 'Enter' , 'Enter' , false , false , false ] ) ; } ) ; }
Rename photos directory to specified name by using directory tree.
Rename photos directory to specified name by using directory tree .
/* ctrl */