gecko-dev/xpcom/tests/unit/test_bug332389.js

17 строки
334 B
JavaScript

const { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm");
function run_test() {
var f = Services.dirsvc.get("CurProcD", Ci.nsIFile);
var terminated = false;
for (var i = 0; i < 100; i++) {
if (f == null) {
terminated = true;
break;
}
f = f.parent;
}
Assert.ok(terminated);
}