mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-03-03 23:30:46 +00:00
unit test (xpcshell) for bug 336691 (nsZipArchive::Test shouldn't try to ExtractFile on directories)
by Ryan Jones <sciguyryan@gmail.com> r=biesi
This commit is contained in:
parent
bc1a2c6821
commit
278563015b
BIN
modules/libjar/test/unit/data/test_bug336691.zip
Normal file
BIN
modules/libjar/test/unit/data/test_bug336691.zip
Normal file
Binary file not shown.
12
modules/libjar/test/unit/test_bug336691.js
Normal file
12
modules/libjar/test/unit/test_bug336691.js
Normal file
@ -0,0 +1,12 @@
|
||||
// Regression test for bug 336691 - nsZipArchive::Test shouldn't try to ExtractFile on directories.
|
||||
const Cc = Components.classes;
|
||||
const Ci = Components.interfaces;
|
||||
|
||||
function run_test() {
|
||||
var file = do_get_file("modules/libjar/test/unit/data/test_bug336691.zip");
|
||||
var zipReader = Cc["@mozilla.org/libjar/zip-reader;1"].
|
||||
createInstance(Ci.nsIZipReader);
|
||||
zipReader.open(file);
|
||||
zipReader.test(null); // We shouldn't crash here.
|
||||
zipReader.close();
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user