function keyboardCopy(path, callback) {
  var filename = 'world.ogv';
  var expectedFilesBefore =
      TestEntryInfo.getExpectedRows(path == RootPath.DRIVE ?
          BASIC_DRIVE_ENTRY_SET : BASIC_LOCAL_ENTRY_SET).sort();
  var expectedFilesAfter =
      expectedFilesBefore.concat([['world (1).ogv', '59 KB', 'OGG video']]);

  var appId;
  StepsRunner.run([
    // Set up File Manager.
    function() {
      setupAndWaitUntilReady(null, path, this.next);
    },
    // Copy the file.
    function(results) {
      appId = results.windowId;
      var fileListBefore = results.fileList;
      chrome.test.assertEq(expectedFilesBefore, fileListBefore);
      remoteCall.callRemoteTestUtil('copyFile', appId, [filename], this.next);
    },
    // Wait for a file list change.
    function(result) {
      chrome.test.assertTrue(result);
      remoteCall.waitForFiles(
          appId, expectedFilesAfter, {ignoreLastModifiedTime: true}).
          then(this.next);
    },
    // Verify the result.
    function(fileList) {
      checkIfNoErrorsOccured(this.next);
    }
  ]);
}
/**
 * Tests copying a file to the same directory and waits until the file lists
 * changes.
 *
 * @param {string} path Directory path to be tested.
 */
Tests copying a file to the same directory and waits until the file lists
changes.

@param {string} path Directory path to be tested.
Tests copying a file to the same directory and waits until the file lists changes . @param { string } path Directory path to be tested .
function keyboardCopy(path, callback) {
  var filename = 'world.ogv';
  var expectedFilesBefore =
      TestEntryInfo.getExpectedRows(path == RootPath.DRIVE ?
          BASIC_DRIVE_ENTRY_SET : BASIC_LOCAL_ENTRY_SET).sort();
  var expectedFilesAfter =
      expectedFilesBefore.concat([['world (1).ogv', '59 KB', 'OGG video']]);
  var appId;
  StepsRunner.run([
    function() {
      setupAndWaitUntilReady(null, path, this.next);
    },
    function(results) {
      appId = results.windowId;
      var fileListBefore = results.fileList;
      chrome.test.assertEq(expectedFilesBefore, fileListBefore);
      remoteCall.callRemoteTestUtil('copyFile', appId, [filename], this.next);
    },
    function(result) {
      chrome.test.assertTrue(result);
      remoteCall.waitForFiles(
          appId, expectedFilesAfter, {ignoreLastModifiedTime: true}).
          then(this.next);
    },
    function(fileList) {
      checkIfNoErrorsOccured(this.next);
    }
  ]);
}
function keyboardCopy ( path , callback ) { var filename = 'world.ogv' ; var expectedFilesBefore = TestEntryInfo . getExpectedRows ( path == RootPath . DRIVE ? BASIC_DRIVE_ENTRY_SET : BASIC_LOCAL_ENTRY_SET ) . sort ( ) ; var expectedFilesAfter = expectedFilesBefore . concat ( [ [ 'world (1).ogv' , '59 KB' , 'OGG video' ] ] ) ; var appId ; StepsRunner . run ( [ function ( ) { setupAndWaitUntilReady ( null , path , this . next ) ; } , function ( results ) { appId = results . windowId ; var fileListBefore = results . fileList ; chrome . test . assertEq ( expectedFilesBefore , fileListBefore ) ; remoteCall . callRemoteTestUtil ( 'copyFile' , appId , [ filename ] , this . next ) ; } , function ( result ) { chrome . test . assertTrue ( result ) ; remoteCall . waitForFiles ( appId , expectedFilesAfter , { ignoreLastModifiedTime : true } ) . then ( this . next ) ; } , function ( fileList ) { checkIfNoErrorsOccured ( this . next ) ; } ] ) ; }
Tests copying a file to the same directory and waits until the file lists
 changes.
Tests copying a file to the same directory and waits until the file lists changes .
// Set up File Manager. // Copy the file. // Wait for a file list change. // Verify the result.