modules/libjar/test/unit/test_bug336691.js

Wed, 31 Dec 2014 07:53:36 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 07:53:36 +0100
branch
TOR_BUG_3246
changeset 5
4ab42b5ab56c
permissions
-rw-r--r--

Correct small whitespace inconsistency, lost while renaming variables.

michael@0 1 // Regression test for bug 336691 - nsZipArchive::Test shouldn't try to ExtractFile on directories.
michael@0 2 const Cc = Components.classes;
michael@0 3 const Ci = Components.interfaces;
michael@0 4
michael@0 5 function run_test() {
michael@0 6 var file = do_get_file("data/test_bug336691.zip");
michael@0 7 var zipReader = Cc["@mozilla.org/libjar/zip-reader;1"].
michael@0 8 createInstance(Ci.nsIZipReader);
michael@0 9 zipReader.open(file);
michael@0 10 zipReader.test(null); // We shouldn't crash here.
michael@0 11 zipReader.close();
michael@0 12 }

mercurial