diff -r 000000000000 -r 6474c204b198 xpcom/tests/unit/test_bug332389.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/xpcom/tests/unit/test_bug332389.js Wed Dec 31 06:09:35 2014 +0100 @@ -0,0 +1,19 @@ +var Cc = Components.classes; +var Ci = Components.interfaces; + +function run_test() { + var f = + Cc["@mozilla.org/file/directory_service;1"]. + getService(Ci.nsIProperties).get("CurProcD", Ci.nsIFile); + + var terminated = false; + for (var i = 0; i < 100; i++) { + if (f == null) { + terminated = true; + break; + } + f = f.parent; + } + + do_check_true(terminated); +}