1
0
Fork 0
firefox/modules/libjar/test/unit/test_bug453254.js
Daniel Baumann 5e9a113729
Adding upstream version 140.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
2025-06-25 09:37:52 +02:00

17 lines
404 B
JavaScript

function run_test() {
const zipCache = Cc["@mozilla.org/libjar/zip-reader-cache;1"].createInstance(
Ci.nsIZipReaderCache
);
zipCache.init(1024);
try {
zipCache.getZip(null);
do_throw("Shouldn't get here!");
} catch (e) {
if (
!(e instanceof Ci.nsIException && e.result == Cr.NS_ERROR_INVALID_POINTER)
) {
throw e;
}
// do nothing, this test passes
}
}