Bug 545892 - Always pass WM_NCPAINT events to the default event procedure. r=bent...
[mozilla-central.git] / xpcom / tests / unit / test_bug476919.js
blobb28c6aa428f4609a17ddf02871be23b0d6e85d86
1 const Cc = Components.classes;
2 const Ci = Components.interfaces;
4 function run_test() {
5   // skip this test on Windows
6   var isWindows = ("@mozilla.org/windows-registry-key;1" in Components.classes);
7   if (!isWindows) {
8     var testDir = __LOCATION__.parent;
9     // create a test file, then symlink it, then check that we think it's a symlink
10     var targetFile = testDir.clone();
11     targetFile.append("target.txt");
12     if (!targetFile.exists())
13       targetFile.create(Ci.nsIFile.NORMAL_FILE_TYPE, 0644);
15     var link = testDir.clone();
16     link.append("link");
17     if (link.exists())
18       link.remove(false);
20     var ln = Cc["@mozilla.org/file/local;1"].createInstance(Ci.nsILocalFile);
21     ln.initWithPath("/bin/ln");
22     var process = Cc["@mozilla.org/process/util;1"].createInstance(Ci.nsIProcess);
23     process.init(ln);
24     var args = ["-s", targetFile.path, link.path];
25     process.run(true, args, args.length);
26     do_check_true(link.isSymlink());
27   }