function mountSuccess() {
      test_util.mountFileSystem(
          chrome.test.callbackPass(function() {
            // Start reading a file in order to open it. Note, that there is no
            // way to directly open a file from JavaScript.
            test_util.fileSystem.root.getFile(
                TESTING_TIRAMISU_FILE.name,
                {create: false},
                chrome.test.callbackPass(function(fileEntry) {
                  fileEntry.file(chrome.test.callbackPass(function(file) {
                    var fileReader = new FileReader();
                    readBreakpointCallback = chrome.test.callbackPass(
                        function() {
                          chrome.fileSystemProvider.getAll(
                              chrome.test.callbackPass(function(fileSystems) {
                                chrome.test.assertEq(1, fileSystems.length);
                                chrome.test.assertEq(
                                    test_util.FILE_SYSTEM_ID,
                                    fileSystems[0].fileSystemId);
                                chrome.test.assertEq(
                                    test_util.FILE_SYSTEM_NAME,
                                    fileSystems[0].displayName);
                                chrome.test.assertTrue(
                                    fileSystems[0].writable);
                                chrome.test.assertEq(2,
                                    fileSystems[0].openedFilesLimit);
                              }));

                          chrome.fileSystemProvider.get(
                              test_util.FILE_SYSTEM_ID,
                              chrome.test.callbackPass(function(fileSystem) {
                                chrome.test.assertEq(
                                    test_util.FILE_SYSTEM_ID,
                                    fileSystem.fileSystemId);
                                chrome.test.assertEq(
                                    test_util.FILE_SYSTEM_NAME,
                                    fileSystem.displayName);
                                chrome.test.assertTrue(fileSystem.writable);
                                chrome.test.assertEq(2,
                                    fileSystem.openedFilesLimit);
                                }));
                        });
                    fileReader.readAsText(file);
                  }),
                  function(error) {
                    chrome.test.fail(error.name);
                  });
                }),
                function(error) {
                  chrome.test.fail(error.name);
                });
          }), {writable: true, openedFilesLimit: 2});
    }
// Verifies if getAll() returns the mounted file system.
Verifies if getAll() returns the mounted file system.
Verifies if getAll () returns the mounted file system .
function mountSuccess() {
      test_util.mountFileSystem(
          chrome.test.callbackPass(function() {
            test_util.fileSystem.root.getFile(
                TESTING_TIRAMISU_FILE.name,
                {create: false},
                chrome.test.callbackPass(function(fileEntry) {
                  fileEntry.file(chrome.test.callbackPass(function(file) {
                    var fileReader = new FileReader();
                    readBreakpointCallback = chrome.test.callbackPass(
                        function() {
                          chrome.fileSystemProvider.getAll(
                              chrome.test.callbackPass(function(fileSystems) {
                                chrome.test.assertEq(1, fileSystems.length);
                                chrome.test.assertEq(
                                    test_util.FILE_SYSTEM_ID,
                                    fileSystems[0].fileSystemId);
                                chrome.test.assertEq(
                                    test_util.FILE_SYSTEM_NAME,
                                    fileSystems[0].displayName);
                                chrome.test.assertTrue(
                                    fileSystems[0].writable);
                                chrome.test.assertEq(2,
                                    fileSystems[0].openedFilesLimit);
                              }));
                          chrome.fileSystemProvider.get(
                              test_util.FILE_SYSTEM_ID,
                              chrome.test.callbackPass(function(fileSystem) {
                                chrome.test.assertEq(
                                    test_util.FILE_SYSTEM_ID,
                                    fileSystem.fileSystemId);
                                chrome.test.assertEq(
                                    test_util.FILE_SYSTEM_NAME,
                                    fileSystem.displayName);
                                chrome.test.assertTrue(fileSystem.writable);
                                chrome.test.assertEq(2,
                                    fileSystem.openedFilesLimit);
                                }));
                        });
                    fileReader.readAsText(file);
                  }),
                  function(error) {
                    chrome.test.fail(error.name);
                  });
                }),
                function(error) {
                  chrome.test.fail(error.name);
                });
          }), {writable: true, openedFilesLimit: 2});
    }
function mountSuccess ( ) { test_util . mountFileSystem ( chrome . test . callbackPass ( function ( ) { test_util . fileSystem . root . getFile ( TESTING_TIRAMISU_FILE . name , { create : false } , chrome . test . callbackPass ( function ( fileEntry ) { fileEntry . file ( chrome . test . callbackPass ( function ( file ) { var fileReader = new FileReader ( ) ; readBreakpointCallback = chrome . test . callbackPass ( function ( ) { chrome . fileSystemProvider . getAll ( chrome . test . callbackPass ( function ( fileSystems ) { chrome . test . assertEq ( 1 , fileSystems . length ) ; chrome . test . assertEq ( test_util . FILE_SYSTEM_ID , fileSystems [ 0 ] . fileSystemId ) ; chrome . test . assertEq ( test_util . FILE_SYSTEM_NAME , fileSystems [ 0 ] . displayName ) ; chrome . test . assertTrue ( fileSystems [ 0 ] . writable ) ; chrome . test . assertEq ( 2 , fileSystems [ 0 ] . openedFilesLimit ) ; } ) ) ; chrome . fileSystemProvider . get ( test_util . FILE_SYSTEM_ID , chrome . test . callbackPass ( function ( fileSystem ) { chrome . test . assertEq ( test_util . FILE_SYSTEM_ID , fileSystem . fileSystemId ) ; chrome . test . assertEq ( test_util . FILE_SYSTEM_NAME , fileSystem . displayName ) ; chrome . test . assertTrue ( fileSystem . writable ) ; chrome . test . assertEq ( 2 , fileSystem . openedFilesLimit ) ; } ) ) ; } ) ; fileReader . readAsText ( file ) ; } ) , function ( error ) { chrome . test . fail ( error . name ) ; } ) ; } ) , function ( error ) { chrome . test . fail ( error . name ) ; } ) ; } ) , { writable : true , openedFilesLimit : 2 } ) ; }
Verifies if getAll() returns the mounted file system.
Verifies if getAll () returns the mounted file system .
// Start reading a file in order to open it. Note, that there is no // way to directly open a file from JavaScript.