function readFromBlob(blobHasher, maxReads) {
  let counter = 0;
  while (blobHasher.fileReader_ && blobHasher.fileReader_.isLoading() &&
         counter <= maxReads) {
    blobHasher.fileReader_.mockLoad();
    counter++;
  }
  assertTrue(counter <= maxReads);
  return counter;
}
Makes the blobHasher read chunks from the blob and hash it. The number of
reads shall not exceed a pre-determined number (typically blob size / chunk
size) for computing hash. This function fails fast (after maxReads is
reached), assuming that the hasher failed to generate hashes. This prevents
the test suite from going into infinite loop.
@param {!BlobHasher} blobHasher Hasher in action.
@param {number} maxReads Max number of read attempts.
@suppress {visibility,missingProperties} suppression added to enable type
checking