diff options
Diffstat (limited to 'toolkit/components')
9 files changed, 25 insertions, 46 deletions
diff --git a/toolkit/components/captivedetect/captivedetect.js b/toolkit/components/captivedetect/captivedetect.js index 5493ecec6..0e8c75981 100644 --- a/toolkit/components/captivedetect/captivedetect.js +++ b/toolkit/components/captivedetect/captivedetect.js @@ -90,7 +90,7 @@ function LoginObserver(captivePortalDetector) { .getService(Ci.nsIHttpActivityDistributor); let urlFetcher = null; - let waitForNetworkActivity = Services.appinfo.widgetToolkit == "gonk"; + let waitForNetworkActivity = false; let pageCheckingDone = function pageCheckingDone() { if (state === LOGIN_OBSERVER_STATE_VERIFYING) { 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); diff --git a/toolkit/components/telemetry/TelemetryEnvironment.jsm b/toolkit/components/telemetry/TelemetryEnvironment.jsm index 910d804ae..295679ca4 100644 --- a/toolkit/components/telemetry/TelemetryEnvironment.jsm +++ b/toolkit/components/telemetry/TelemetryEnvironment.jsm @@ -28,11 +28,9 @@ XPCOMUtils.defineLazyModuleGetter(this, "AttributionCode", "resource:///modules/AttributionCode.jsm"); XPCOMUtils.defineLazyModuleGetter(this, "ctypes", "resource://gre/modules/ctypes.jsm"); -if (AppConstants.platform !== "gonk") { - Cu.import("resource://gre/modules/AddonManager.jsm"); - XPCOMUtils.defineLazyModuleGetter(this, "LightweightThemeManager", - "resource://gre/modules/LightweightThemeManager.jsm"); -} +Cu.import("resource://gre/modules/AddonManager.jsm"); +XPCOMUtils.defineLazyModuleGetter(this, "LightweightThemeManager", + "resource://gre/modules/LightweightThemeManager.jsm"); XPCOMUtils.defineLazyModuleGetter(this, "ProfileAge", "resource://gre/modules/ProfileAge.jsm"); XPCOMUtils.defineLazyModuleGetter(this, "UpdateUtils", @@ -528,11 +526,9 @@ EnvironmentAddonBuilder.prototype = { _updateAddons: Task.async(function* () { this._environment._log.trace("_updateAddons"); let personaId = null; - if (AppConstants.platform !== "gonk") { - let theme = LightweightThemeManager.currentTheme; - if (theme) { - personaId = theme.id; - } + let theme = LightweightThemeManager.currentTheme; + if (theme) { + personaId = theme.id; } let addons = { @@ -745,14 +741,8 @@ function EnvironmentCache() { // until the initial environment has been built. let p = []; - if (AppConstants.platform === "gonk") { - this._addonBuilder = { - watchForChanges: function() {} - }; - } else { - this._addonBuilder = new EnvironmentAddonBuilder(this); - p = [ this._addonBuilder.init() ]; - } + this._addonBuilder = new EnvironmentAddonBuilder(this); + p = [ this._addonBuilder.init() ]; this._currentEnvironment.profile = {}; p.push(this._updateProfile()); @@ -1079,10 +1069,6 @@ EnvironmentCache.prototype = { * @returns null on error, true if we are the default browser, or false otherwise. */ _isDefaultBrowser: function () { - if (AppConstants.platform === "gonk") { - return true; - } - if (!("@mozilla.org/browser/shell-service;1" in Cc)) { this._log.info("_isDefaultBrowser - Could not obtain browser shell service"); return null; @@ -1139,10 +1125,8 @@ EnvironmentCache.prototype = { userPrefs: this._getPrefData(), }; - if (AppConstants.platform !== "gonk") { - this._currentEnvironment.settings.addonCompatibilityCheckEnabled = - AddonManager.checkCompatibility; - } + this._currentEnvironment.settings.addonCompatibilityCheckEnabled = + AddonManager.checkCompatibility; if (AppConstants.platform !== "android") { this._currentEnvironment.settings.isDefaultBrowser = @@ -1246,7 +1230,7 @@ EnvironmentCache.prototype = { * not a portable device. */ _getDeviceData: function () { - if (!["gonk", "android"].includes(AppConstants.platform)) { + if (!["android"].includes(AppConstants.platform)) { return null; } @@ -1269,7 +1253,7 @@ EnvironmentCache.prototype = { locale: forceToStringOrNull(getSystemLocale()), }; - if (["gonk", "android"].includes(AppConstants.platform)) { + if (["android"].includes(AppConstants.platform)) { data.kernelVersion = forceToStringOrNull(getSysinfoProperty("kernel_version", null)); } else if (AppConstants.platform === "win") { // The path to the "UBR" key, queried to get additional version details on Windows. @@ -1333,7 +1317,7 @@ EnvironmentCache.prototype = { features: {}, }; - if (!["gonk", "android", "linux"].includes(AppConstants.platform)) { + if (!["android", "linux"].includes(AppConstants.platform)) { let gfxInfo = Cc["@mozilla.org/gfx/info;1"].getService(Ci.nsIGfxInfo); try { gfxData.monitors = gfxInfo.getMonitors(); @@ -1398,7 +1382,7 @@ EnvironmentCache.prototype = { if (AppConstants.platform === "win") { data.isWow64 = getSysinfoProperty("isWow64", null); - } else if (["gonk", "android"].includes(AppConstants.platform)) { + } else if (["android"].includes(AppConstants.platform)) { data.device = this._getDeviceData(); } diff --git a/toolkit/components/telemetry/TelemetrySession.jsm b/toolkit/components/telemetry/TelemetrySession.jsm index 3d97dc155..179e6436a 100644 --- a/toolkit/components/telemetry/TelemetrySession.jsm +++ b/toolkit/components/telemetry/TelemetrySession.jsm @@ -1372,7 +1372,7 @@ var Impl = { let payload; try { - const isMobile = ["gonk", "android"].includes(AppConstants.platform); + const isMobile = ["android"].includes(AppConstants.platform); const isSubsession = isMobile ? false : !this._isClassicReason(reason); if (isMobile) { diff --git a/toolkit/components/telemetry/TelemetryStorage.jsm b/toolkit/components/telemetry/TelemetryStorage.jsm index 91cfc993d..c844aacf0 100644 --- a/toolkit/components/telemetry/TelemetryStorage.jsm +++ b/toolkit/components/telemetry/TelemetryStorage.jsm @@ -106,7 +106,7 @@ PingParseError.prototype.constructor = PingParseError; var Policy = { now: () => new Date(), getArchiveQuota: () => ARCHIVE_QUOTA_BYTES, - getPendingPingsQuota: () => (AppConstants.platform in ["android", "gonk"]) + getPendingPingsQuota: () => (AppConstants.platform in ["android"]) ? PENDING_PINGS_QUOTA_BYTES_MOBILE : PENDING_PINGS_QUOTA_BYTES_DESKTOP, }; diff --git a/toolkit/components/telemetry/tests/unit/head.js b/toolkit/components/telemetry/tests/unit/head.js index 51be25766..87afd3617 100644 --- a/toolkit/components/telemetry/tests/unit/head.js +++ b/toolkit/components/telemetry/tests/unit/head.js @@ -20,7 +20,7 @@ XPCOMUtils.defineLazyModuleGetter(this, "OS", const gIsWindows = AppConstants.platform == "win"; const gIsMac = AppConstants.platform == "macosx"; const gIsAndroid = AppConstants.platform == "android"; -const gIsGonk = AppConstants.platform == "gonk"; +const gIsGonk = false; const gIsLinux = AppConstants.platform == "linux"; const Telemetry = Cc["@mozilla.org/base/telemetry;1"].getService(Ci.nsITelemetry); |