Mozilla/mozilla/xpcom/tests/unit/test_bug332389.js
jwalden%mit.edu 3aa1dfb759 Bug 373640 - nsIFile.parent throws an exception on reaching top of file system on Windows -- should return null. r=bsmedberg
git-svn-id: svn://10.0.0.236/trunk@222344 18797224-902f-48f8-a5cc-f745e15eee43
2007-03-25 07:28:06 +00:00

20 lines
389 B
JavaScript

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);
}