summaryrefslogtreecommitdiffstats
path: root/toolkit/components/osfile
diff options
context:
space:
mode:
Diffstat (limited to 'toolkit/components/osfile')
-rw-r--r--toolkit/components/osfile/modules/osfile_async_front.jsm4
-rw-r--r--toolkit/components/osfile/tests/xpcshell/test_constants.js7
-rw-r--r--toolkit/components/osfile/tests/xpcshell/test_osfile_async_setDates.js6
-rw-r--r--toolkit/components/osfile/tests/xpcshell/test_path_constants.js2
4 files changed, 7 insertions, 12 deletions
diff --git a/toolkit/components/osfile/modules/osfile_async_front.jsm b/toolkit/components/osfile/modules/osfile_async_front.jsm
index 181471cd8..964e53084 100644
--- a/toolkit/components/osfile/modules/osfile_async_front.jsm
+++ b/toolkit/components/osfile/modules/osfile_async_front.jsm
@@ -753,13 +753,13 @@ File.prototype = {
};
-if (SharedAll.Constants.Sys.Name != "Android" && SharedAll.Constants.Sys.Name != "Gonk") {
+if (SharedAll.Constants.Sys.Name != "Android") {
/**
* Set the last access and modification date of the file.
* The time stamp resolution is 1 second at best, but might be worse
* depending on the platform.
*
- * WARNING: This method is not implemented on Android/B2G. On Android/B2G,
+ * WARNING: This method is not implemented on Android. On Android,
* you should use File.setDates instead.
*
* @return {promise}
diff --git a/toolkit/components/osfile/tests/xpcshell/test_constants.js b/toolkit/components/osfile/tests/xpcshell/test_constants.js
index e92f33ab8..5b91484bd 100644
--- a/toolkit/components/osfile/tests/xpcshell/test_constants.js
+++ b/toolkit/components/osfile/tests/xpcshell/test_constants.js
@@ -15,12 +15,7 @@ add_task(function* check_definition() {
do_check_true(OS.Constants.Path!=null);
do_check_true(OS.Constants.Sys!=null);
//check system name
- if (OS.Constants.Sys.Name == "Gonk") {
- // Services.appinfo.OS doesn't know the difference between Gonk and Android
- do_check_eq(Services.appinfo.OS, "Android");
- } else {
- do_check_eq(Services.appinfo.OS, OS.Constants.Sys.Name);
- }
+ do_check_eq(Services.appinfo.OS, OS.Constants.Sys.Name);
//check if using DEBUG build
if (Components.classes["@mozilla.org/xpcom/debug;1"].getService(Components.interfaces.nsIDebug2).isDebugBuild == true) {
diff --git a/toolkit/components/osfile/tests/xpcshell/test_osfile_async_setDates.js b/toolkit/components/osfile/tests/xpcshell/test_osfile_async_setDates.js
index 17d3afa7c..6a5ecd5e3 100644
--- a/toolkit/components/osfile/tests/xpcshell/test_osfile_async_setDates.js
+++ b/toolkit/components/osfile/tests/xpcshell/test_osfile_async_setDates.js
@@ -96,8 +96,8 @@ add_task(function* test_nonproto() {
// Prototypical tests, operating on |File| handles.
add_task(function* test_proto() {
- if (OS.Constants.Sys.Name == "Android" || OS.Constants.Sys.Name == "Gonk") {
- do_print("File.prototype.setDates is not implemented for Android/B2G");
+ if (OS.Constants.Sys.Name == "Android") {
+ do_print("File.prototype.setDates is not implemented for Android");
do_check_eq(OS.File.prototype.setDates, undefined);
return;
}
@@ -107,7 +107,7 @@ add_task(function* test_proto() {
"test_osfile_async_setDates_proto.tmp");
yield OS.File.writeAtomic(path, new Uint8Array(1));
- try {
+ try {
let fd = yield OS.File.open(path, {write: true});
try {
diff --git a/toolkit/components/osfile/tests/xpcshell/test_path_constants.js b/toolkit/components/osfile/tests/xpcshell/test_path_constants.js
index c0057c750..9b9868bb2 100644
--- a/toolkit/components/osfile/tests/xpcshell/test_path_constants.js
+++ b/toolkit/components/osfile/tests/xpcshell/test_path_constants.js
@@ -58,7 +58,7 @@ add_task(function* test_simple_paths() {
// Test presence of paths that only exist on Desktop platforms
add_task(function* test_desktop_paths() {
- if (OS.Constants.Sys.Name == "Android" || OS.Constants.Sys.Name == "Gonk") {
+ if (OS.Constants.Sys.Name == "Android") {
return;
}
do_check_true(!!OS.Constants.Path.desktopDir);