modules/libjar/test/unit/test_bug453254.js

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/modules/libjar/test/unit/test_bug453254.js	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,12 @@
     1.4 +function run_test() {
     1.5 +  const zipCache = Components.classes["@mozilla.org/libjar/zip-reader-cache;1"]
     1.6 +                             .createInstance(Components.interfaces.nsIZipReaderCache);
     1.7 +  zipCache.init(1024);
     1.8 +  try {
     1.9 +    zipCache.getZip(null);
    1.10 +    do_throw("Shouldn't get here!");
    1.11 +  } catch (e if ((e instanceof Components.interfaces.nsIException) &&
    1.12 +                 (e.result == Components.results.NS_ERROR_INVALID_POINTER))) {
    1.13 +    // do nothing, this test passes
    1.14 +  }
    1.15 +}

mercurial