function addBrokenFileWatcher() {
      test_util.fileSystem.root.getFile(
          TESTING_BROKEN_FILE.name,
          {create: false},
          chrome.test.callbackPass(function(fileEntry) {
            chrome.test.assertEq(TESTING_BROKEN_FILE.name, fileEntry.name);
            chrome.fileManagerPrivate.addFileWatch(
                fileEntry,
                chrome.test.callbackFail(
                    'Unknown error.', function(result) {
                      chrome.test.assertFalse(!!result);
                      chrome.fileSystemProvider.getAll(
                          chrome.test.callbackPass(function(fileSystems) {
                            chrome.test.assertEq(1, fileSystems.length);
                            chrome.test.assertEq(
                                1, fileSystems[0].watchers.length);
                          }));
                    }));
          }), function(error) {
            chrome.test.fail(error.name);
          });
    }
// Add an entry watcher on a broken file, what should fail.
Add an entry watcher on a broken file, what should fail.
Add an entry watcher on a broken file what should fail .
function addBrokenFileWatcher() {
      test_util.fileSystem.root.getFile(
          TESTING_BROKEN_FILE.name,
          {create: false},
          chrome.test.callbackPass(function(fileEntry) {
            chrome.test.assertEq(TESTING_BROKEN_FILE.name, fileEntry.name);
            chrome.fileManagerPrivate.addFileWatch(
                fileEntry,
                chrome.test.callbackFail(
                    'Unknown error.', function(result) {
                      chrome.test.assertFalse(!!result);
                      chrome.fileSystemProvider.getAll(
                          chrome.test.callbackPass(function(fileSystems) {
                            chrome.test.assertEq(1, fileSystems.length);
                            chrome.test.assertEq(
                                1, fileSystems[0].watchers.length);
                          }));
                    }));
          }), function(error) {
            chrome.test.fail(error.name);
          });
    }
function addBrokenFileWatcher ( ) { test_util . fileSystem . root . getFile ( TESTING_BROKEN_FILE . name , { create : false } , chrome . test . callbackPass ( function ( fileEntry ) { chrome . test . assertEq ( TESTING_BROKEN_FILE . name , fileEntry . name ) ; chrome . fileManagerPrivate . addFileWatch ( fileEntry , chrome . test . callbackFail ( 'Unknown error.' , function ( result ) { chrome . test . assertFalse ( ! ! result ) ; chrome . fileSystemProvider . getAll ( chrome . test . callbackPass ( function ( fileSystems ) { chrome . test . assertEq ( 1 , fileSystems . length ) ; chrome . test . assertEq ( 1 , fileSystems [ 0 ] . watchers . length ) ; } ) ) ; } ) ) ; } ) , function ( error ) { chrome . test . fail ( error . name ) ; } ) ; }
Add an entry watcher on a broken file, what should fail.
Add an entry watcher on a broken file what should fail .