unit test (xpcshell) for bug 336691 (nsZipArchive::Test shouldn't try to ExtractFile on directories)
by Ryan Jones <sciguyryan@gmail.com> r=biesi git-svn-id: svn://10.0.0.236/trunk@221464 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
BIN
mozilla/modules/libjar/test/unit/data/test_bug336691.zip
Normal file
BIN
mozilla/modules/libjar/test/unit/data/test_bug336691.zip
Normal file
Binary file not shown.
12
mozilla/modules/libjar/test/unit/test_bug336691.js
Normal file
12
mozilla/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();
|
||||
}
|
||||
Reference in New Issue
Block a user