modules/libjar/test/unit/test_bug453254.js

Wed, 31 Dec 2014 06:09:35 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:09:35 +0100
changeset 0
6474c204b198
permissions
-rw-r--r--

Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.

     1 function run_test() {
     2   const zipCache = Components.classes["@mozilla.org/libjar/zip-reader-cache;1"]
     3                              .createInstance(Components.interfaces.nsIZipReaderCache);
     4   zipCache.init(1024);
     5   try {
     6     zipCache.getZip(null);
     7     do_throw("Shouldn't get here!");
     8   } catch (e if ((e instanceof Components.interfaces.nsIException) &&
     9                  (e.result == Components.results.NS_ERROR_INVALID_POINTER))) {
    10     // do nothing, this test passes
    11   }
    12 }

mercurial