diff --git a/xpcom/tests/unit/test_bug476919.js b/xpcom/tests/unit/test_bug476919.js index 54c050b06ffd..5ba64758c7ca 100644 --- a/xpcom/tests/unit/test_bug476919.js +++ b/xpcom/tests/unit/test_bug476919.js @@ -1,30 +1,25 @@ /* global __LOCATION__ */ function run_test() { - // skip this test on Windows - if (mozinfo.os != "win") { - var testDir = __LOCATION__.parent; - // create a test file, then symlink it, then check that we think it's a symlink - var targetFile = testDir.clone(); - targetFile.append("target.txt"); - if (!targetFile.exists()) { - targetFile.create(Ci.nsIFile.NORMAL_FILE_TYPE, 0o644); - } - - var link = testDir.clone(); - link.append("link"); - if (link.exists()) { - link.remove(false); - } - - var ln = Cc["@mozilla.org/file/local;1"].createInstance(Ci.nsIFile); - ln.initWithPath("/bin/ln"); - var process = Cc["@mozilla.org/process/util;1"].createInstance( - Ci.nsIProcess - ); - process.init(ln); - var args = ["-s", targetFile.path, link.path]; - process.run(true, args, args.length); - Assert.ok(link.isSymlink()); + var testDir = __LOCATION__.parent; + // create a test file, then symlink it, then check that we think it's a symlink + var targetFile = testDir.clone(); + targetFile.append("target.txt"); + if (!targetFile.exists()) { + targetFile.create(Ci.nsIFile.NORMAL_FILE_TYPE, 0o644); } + + var link = testDir.clone(); + link.append("link"); + if (link.exists()) { + link.remove(false); + } + + var ln = Cc["@mozilla.org/file/local;1"].createInstance(Ci.nsIFile); + ln.initWithPath("/bin/ln"); + var process = Cc["@mozilla.org/process/util;1"].createInstance(Ci.nsIProcess); + process.init(ln); + var args = ["-s", targetFile.path, link.path]; + process.run(true, args, args.length); + Assert.ok(link.isSymlink()); } diff --git a/xpcom/tests/unit/test_symlinks.js b/xpcom/tests/unit/test_symlinks.js index bcd149ebb2db..fb89a1c43769 100644 --- a/xpcom/tests/unit/test_symlinks.js +++ b/xpcom/tests/unit/test_symlinks.js @@ -134,11 +134,6 @@ function testSymLinks(testDir, relative) { } function run_test() { - // Skip this test on Windows - if (mozinfo.os == "win") { - return; - } - var testDir = CWD; testDir.append("test_symlinks"); diff --git a/xpcom/tests/unit/xpcshell.ini b/xpcom/tests/unit/xpcshell.ini index 10bedbf6a9f6..9001f55380a5 100644 --- a/xpcom/tests/unit/xpcshell.ini +++ b/xpcom/tests/unit/xpcshell.ini @@ -15,6 +15,8 @@ generated-files = [test_bug364285-1.js] [test_bug374754.js] [test_bug476919.js] +# Creating a symlink requires admin or developer mode on Windows. +skip-if = os == "win" # Bug 676998: test fails consistently on Android fail-if = os == "android" [test_bug478086.js] @@ -47,6 +49,8 @@ skip-if = os == "android" [test_seek_multiplex.js] [test_stringstream.js] [test_symlinks.js] +# Creating a symlink requires admin or developer mode on Windows. +skip-if = os == "win" # Bug 676998: test fails consistently on Android fail-if = os == "android" [test_systemInfo.js]