function testGoldenChecksum() {
            new Promise(
                function(fulfill, reject) {
                  fileSystem.root.getFile(
                      'test_dir/test_file.txt',
                      {create: false},
                      function(entry) {
                        chrome.test.assertTrue(!!entry);
                        fulfill(entry);
                      });
                  })
                .then(
                    function(entry) {
                      chrome.fileManagerPrivate.computeChecksum(
                          entry,
                          chrome.test.callbackPass(function(result) {
                            chrome.test.assertEq(kExpectedHash, result);
                          }));
                    })
                .catch(chrome.test.fail);
          }
// Checks the checksum code using a golden file.
Checks the checksum code using a golden file.
Checks the checksum code using a golden file .
function testGoldenChecksum() {
            new Promise(
                function(fulfill, reject) {
                  fileSystem.root.getFile(
                      'test_dir/test_file.txt',
                      {create: false},
                      function(entry) {
                        chrome.test.assertTrue(!!entry);
                        fulfill(entry);
                      });
                  })
                .then(
                    function(entry) {
                      chrome.fileManagerPrivate.computeChecksum(
                          entry,
                          chrome.test.callbackPass(function(result) {
                            chrome.test.assertEq(kExpectedHash, result);
                          }));
                    })
                .catch(chrome.test.fail);
          }
function testGoldenChecksum ( ) { new Promise ( function ( fulfill , reject ) { fileSystem . root . getFile ( 'test_dir/test_file.txt' , { create : false } , function ( entry ) { chrome . test . assertTrue ( ! ! entry ) ; fulfill ( entry ) ; } ) ; } ) . then ( function ( entry ) { chrome . fileManagerPrivate . computeChecksum ( entry , chrome . test . callbackPass ( function ( result ) { chrome . test . assertEq ( kExpectedHash , result ) ; } ) ) ; } ) . catch ( chrome . test . fail ) ; }
Checks the checksum code using a golden file.
Checks the checksum code using a golden file .