Skip to content
Snippets Groups Projects
Commit fc5c4461 authored by Cosmin Sabou's avatar Cosmin Sabou
Browse files

Backed out 2 changesets (bug 1762749) for causing xpcshell failures on...

Backed out 2 changesets (bug 1762749) for causing xpcshell failures on test_localfile.js. CLOSED TREE

Backed out changeset 798125b026fb (bug 1762749)
Backed out changeset 3a3ece958323 (bug 1762749)
parent 771e7565
No related branches found
No related tags found
No related merge requests found
......@@ -196,6 +196,8 @@ module.exports = {
"modules/libpref/test/unit/test_dirtyPrefs.js",
"toolkit/crashreporter/test/unit/test_crash_AsyncShutdown.js",
"toolkit/mozapps/update/tests/unit_aus_update/testConstants.js",
"xpcom/tests/unit/test_hidden_files.js",
"xpcom/tests/unit/test_localfile.js",
// These are more complicated bugs which may require some in-depth
// investigation or different solutions. They are also likely to be
......
const NS_OS_TEMP_DIR = "TmpD";
const CWD = do_get_cwd();
const { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm");
var hiddenUnixFile;
......
......@@ -9,7 +9,16 @@ const MILLIS_PER_DAY = 1000 * 60 * 60 * 24;
var LocalFile = CC("@mozilla.org/file/local;1", "nsIFile", "initWithPath");
add_task(function test_toplevel_parent_is_null() {
function run_test() {
test_toplevel_parent_is_null();
test_normalize_crash_if_media_missing();
test_file_modification_time();
test_directory_modification_time();
test_diskSpaceAvailable();
test_diskCapacity();
}
function test_toplevel_parent_is_null() {
try {
var lf = new LocalFile("C:\\");
......@@ -22,9 +31,9 @@ add_task(function test_toplevel_parent_is_null() {
// not Windows
Assert.equal(e.result, Cr.NS_ERROR_FILE_UNRECOGNIZED_PATH);
}
});
}
add_task(function test_normalize_crash_if_media_missing() {
function test_normalize_crash_if_media_missing() {
const a = "a".charCodeAt(0);
const z = "z".charCodeAt(0);
for (var i = a; i <= z; ++i) {
......@@ -32,10 +41,10 @@ add_task(function test_normalize_crash_if_media_missing() {
LocalFile(String.fromCharCode(i) + ":.\\test").normalize();
} catch (e) {}
}
});
}
// Tests that changing a file's modification time is possible
add_task(function test_file_modification_time() {
function test_file_modification_time() {
var file = do_get_profile();
file.append("testfile");
......@@ -72,10 +81,10 @@ add_task(function test_file_modification_time() {
Assert.ok(diff < MAX_TIME_DIFFERENCE);
file.remove(true);
});
}
// Tests that changing a directory's modification time is possible
add_task(function test_directory_modification_time() {
function test_directory_modification_time() {
var dir = do_get_profile();
dir.append("testdir");
......@@ -106,9 +115,9 @@ add_task(function test_directory_modification_time() {
Assert.ok(diff < MAX_TIME_DIFFERENCE);
dir.remove(true);
});
}
add_task(function test_diskSpaceAvailable() {
function test_diskSpaceAvailable() {
let file = do_get_profile();
file.QueryInterface(Ci.nsIFile);
......@@ -125,9 +134,9 @@ add_task(function test_diskSpaceAvailable() {
Assert.ok(bytes > 0);
file.remove(true);
});
}
add_task(function test_diskCapacity() {
function test_diskCapacity() {
let file = do_get_profile();
file.QueryInterface(Ci.nsIFile);
......@@ -145,9 +154,9 @@ add_task(function test_diskCapacity() {
Assert.ok(startBytes === endBytes);
file.remove(true);
});
}
add_task(function test_file_creation_time() {
function test_file_creation_time() {
const file = do_get_profile();
file.append("testfile");
......@@ -182,4 +191,4 @@ add_task(function test_file_creation_time() {
Assert.ok(creationTime === file.creationTime);
file.remove(true);
});
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment