test_bug658093.js (623B)
1 /* Any copyright is dedicated to the Public Domain. 2 * http://creativecommons.org/publicdomain/zero/1.0/ 3 */ 4 5 const { NetUtil } = ChromeUtils.importESModule( 6 "resource://gre/modules/NetUtil.sys.mjs" 7 ); 8 9 // Check that we don't crash on reading a directory entry signature 10 11 function run_test() { 12 var file = do_get_file("data/test_bug658093.zip"); 13 var spec = "jar:" + Services.io.newFileURI(file).spec + "!/0000"; 14 var channel = NetUtil.newChannel({ 15 uri: spec, 16 loadUsingSystemPrincipal: true, 17 }); 18 var failed = false; 19 try { 20 channel.open(); 21 } catch (e) { 22 failed = true; 23 } 24 Assert.ok(failed); 25 }