tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

test_corrupt_1801102.js (563B)


      1 /* Any copyright is dedicated to the Public Domain.
      2 * http://creativecommons.org/publicdomain/zero/1.0/
      3 */
      4 
      5 // Regression test ensuring that that a STORED entry with differing compressed
      6 // and uncompressed sizes is considered to be corrupt.
      7 
      8 add_task(async function test1801102() {
      9  let file = do_get_file("data/test_1801102.jar");
     10 
     11  let zipreader = Cc["@mozilla.org/libjar/zip-reader;1"].createInstance(
     12    Ci.nsIZipReader
     13  );
     14  zipreader.open(file);
     15  Assert.throws(
     16    () => zipreader.test(""),
     17    /NS_ERROR_FILE_CORRUPTED/,
     18    "must throw"
     19  );
     20 });