function copyEntrySuccess() {
      test_util.fileSystem.root.getFile(
          TESTING_FILE.name, {create: false},
          chrome.test.callbackPass(function(sourceEntry) {
            chrome.test.assertEq(TESTING_FILE.name, sourceEntry.name);
            chrome.test.assertFalse(sourceEntry.isDirectory);
            sourceEntry.copyTo(
                test_util.fileSystem.root,
                TESTING_NEW_FILE_NAME,
                chrome.test.callbackPass(function(targetEntry) {
                  chrome.test.assertEq(TESTING_NEW_FILE_NAME, targetEntry.name);
                  chrome.test.assertFalse(targetEntry.isDirectory);
                }), function(error) {
                  chrome.test.fail(error.name);
                });
          }), function(error) {
            chrome.test.fail(error.name);
          });
    }
// Copy an existing file to a non-existing destination. Should succeed.
Copy an existing file to a non-existing destination. Should succeed.
Copy an existing file to a non - existing destination . Should succeed .
function copyEntrySuccess() {
      test_util.fileSystem.root.getFile(
          TESTING_FILE.name, {create: false},
          chrome.test.callbackPass(function(sourceEntry) {
            chrome.test.assertEq(TESTING_FILE.name, sourceEntry.name);
            chrome.test.assertFalse(sourceEntry.isDirectory);
            sourceEntry.copyTo(
                test_util.fileSystem.root,
                TESTING_NEW_FILE_NAME,
                chrome.test.callbackPass(function(targetEntry) {
                  chrome.test.assertEq(TESTING_NEW_FILE_NAME, targetEntry.name);
                  chrome.test.assertFalse(targetEntry.isDirectory);
                }), function(error) {
                  chrome.test.fail(error.name);
                });
          }), function(error) {
            chrome.test.fail(error.name);
          });
    }
function copyEntrySuccess ( ) { test_util . fileSystem . root . getFile ( TESTING_FILE . name , { create : false } , chrome . test . callbackPass ( function ( sourceEntry ) { chrome . test . assertEq ( TESTING_FILE . name , sourceEntry . name ) ; chrome . test . assertFalse ( sourceEntry . isDirectory ) ; sourceEntry . copyTo ( test_util . fileSystem . root , TESTING_NEW_FILE_NAME , chrome . test . callbackPass ( function ( targetEntry ) { chrome . test . assertEq ( TESTING_NEW_FILE_NAME , targetEntry . name ) ; chrome . test . assertFalse ( targetEntry . isDirectory ) ; } ) , function ( error ) { chrome . test . fail ( error . name ) ; } ) ; } ) , function ( error ) { chrome . test . fail ( error . name ) ; } ) ; }
Copy an existing file to a non-existing destination.
Copy an existing file to a non - existing destination .