Files
palemoon27/toolkit/modules/AppConstants.jsm
T
roytam1 30f7e10db1 import changes from `dev' branch of rmottola/Arctic-Fox:
- Bug 937810 - disable application reputation check on b2g r=mmc,mossop (403f8e0353)
- Bug 1216537 - Check and request storage permission if file download is started. r=nalexander,paolo (9233e7193d)
- Bug 1163937 - Added forceSave function to DownloadIntegration and ensured that downloads removed in Sanitizer do not persist. r=margaret (9610017b5d)
- Bug 989960 - Unhandled rejections in DOM Promises should cause xpcshell tests to fail. r=Yoric (be260d55d2)
- Bug 1177237 - Implement OS query parsing and user search choice. r=jaws (86c807e606)
- Bug 1177443 - Add 'system' purpose for searches coming from outside Firefox, r=MattN. (f6ac86ec2a)
- Bug 1072037, part 2 - Tests for the effect of setting CSS animation's AnimationPlayer.currentTime. r=birtles (79639d2ea4)
- bits of Bug 1145246, part 2 (849519f25d)
- bits of Bug 1145246, part 7 (3ec5500e08)
- bits of Bug 1109390 part 5 (6d849b9b3c)
- Bug 1074630, part 2 - CSS animations tests for Web Animations finishing behavior. r=birtles (bd0aa575bd)
- Bug 1073379, part 6 - Tests for the effect of setting CSS animation's AnimationPlayer.startTime. r=dholbert (9d8aad8d28)
- Bug 1073379, part 6b - Re-enable the player.playState check in checkStateAtActiveIntervalEndTime, but disable the first checkStateAtActiveIntervalEndTime call in the 'Skipping backwards through animation' tests. r=orange (3a9ea58cef)
- Bug 1141710, part 1 - Update to the new version of addDiv() in testcommon.js. r=dholbert (262b9dc018)
- Bug 1141710, part 2 - Update comments to be non-Mozilla specific. r=dholbert (177e8818f8)
- Bug 1141710, part 3 - Stop using ECMAScript 6 features in test_animation-player-starttime.html, since other browsers don't support them. r=dholbert (6f0c6ab687)
- Bug 1141710, part 4 - Avoid race condition when taking timestamps by reusing the original timestamp. r=dholbert (bc6ff2f3b1)
- Bug 1141710, part 5 - Change from assert_true() to the new assert_unreached(). r=dholbert (0c1608c4c4)
- Bug 1141710, part 7 - Create helpers to get the startTime corresponding to various points through the active duration. r=dholbert (568cf9a054)
- Bug 1141710, part 7 - Store the generated 'animation' property string in a global constant and reuse that constant. r=dholbert (ce85c0d7a9)
- Bug 1141710, part 8 - Create helpers to get the startTime corresponding to various points through the active duration. r=dholbert (6d6b1625ff)
- Bug 1141710, part 9 - Get the timeline from the player instead of from the document. r=dholbert (9660c00f1d)
- Bug 1141710, part 10 - Update some assertion text and comments. r=birtles (d238a482b5)
- Bug 1141710, part 11 - Assert that seeking over the before and active phases worked. r=birtles (4aedf388f9)
- Bug 1141710, part 12 - Check that the hold time is updated when the startTime is set to null. r=birtles (0473baeabd)
- Bug 1141710, part 13 - Wrap all lines at the 80 column mark. r=birtles (7d3ed6b453)
- Bug 1141710, part 14 - Get rid of the checks at 90% through the active duration. r=birtles (0f3c4cb7ca)
- part of Bug 1145246, part 2 - (ec09bf3fdd)
- half of Bug 1109390 part 1 - Add tests for getting the startTime; r=jwatt (a682851ba6)
- Bug 1149832 - Replace the Web Animations test helper waitForTwoAnimationFrames() with a helper that takes a frame count. r=birtles (da312eae7d)
- Bug 1235286 - Part 1: Add an argument to waitForAnimationFrames to run a task in each requestAnimationFrame callback. r=birtles (199a789546)
- Bug 1235286 - Part 2: Tests for animation optimizations. r=birtles (e510c68a7c)
- Bug 1235286 - Part 3: Comment out some compositor animations tests. r=birtles (61791d5b69)
- Bug 1235345 - Remove services/metrics. r=gfritzsche (29ac4a5895)
- Bug 1204846 - Modify the NetworkStatsDB to allow getSamples returns expired data at first sample and modify the test case. r=ethan (3e9d1f9a77)
- Bug 1237227 - Check the return of context->GetDisplayRootPresContext() for validity. r=roc (2ad8dcf545)
- sync parts of AppConstants.jsm for isPlatformAndVersion* functions
2023-10-11 11:06:39 +08:00

151 lines
2.6 KiB
JavaScript

#filter substitution
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
* You can obtain one at http://mozilla.org/MPL/2.0/. */
"use strict";
Components.utils.import("resource://gre/modules/XPCOMUtils.jsm");
XPCOMUtils.defineLazyModuleGetter(this, "Services", "resource://gre/modules/Services.jsm");
this.EXPORTED_SYMBOLS = ["AppConstants"];
// Immutable for export.
let AppConstants = Object.freeze({
// See this wiki page for more details about channel specific build
// defines: https://wiki.mozilla.org/Platform/Channel-specific_build_defines
NIGHTLY_BUILD:
#ifdef NIGHTLY_BUILD
true,
#else
false,
#endif
RELEASE_BUILD:
#ifdef RELEASE_BUILD
true,
#else
false,
#endif
ACCESSIBILITY:
#ifdef ACCESSIBILITY
true,
#else
false,
#endif
// Official corresponds, roughly, to whether this build is performed
// on Mozilla's continuous integration infrastructure. You should
// disable developer-only functionality when this flag is set.
MOZILLA_OFFICIAL:
#ifdef MOZILLA_OFFICIAL
true,
#else
false,
#endif
MOZ_OFFICIAL_BRANDING:
#ifdef MOZ_OFFICIAL_BRANDING
true,
#else
false,
#endif
MOZ_DEV_EDITION:
#ifdef MOZ_DEV_EDITION
true,
#else
false,
#endif
MOZ_DEV_EDITION:
#ifdef MOZ_DEV_EDITION
true,
#else
false,
#endif
MOZ_SERVICES_HEALTHREPORT:
#ifdef MOZ_SERVICES_HEALTHREPORT
true,
#else
false,
#endif
MOZ_DATA_REPORTING:
#ifdef MOZ_DATA_REPORTING
true,
#else
false,
#endif
MOZ_DEVICES:
#ifdef MOZ_DEVICES
true,
#else
false,
#endif
MOZ_TELEMETRY_REPORTING:
#ifdef MOZ_TELEMETRY_REPORTING
true,
#else
false,
#endif
MOZ_WEBRTC:
#ifdef MOZ_WEBRTC
true,
#else
false,
#endif
MOZ_B2G_RIL:
#ifdef MOZ_B2G_RIL
true,
#else
false,
#endif
platform:
#ifdef MOZ_WIDGET_GTK
"linux",
#elif MOZ_WIDGET_QT
"linux",
#elif XP_WIN
"win",
#elif XP_MACOSX
"macosx",
#elif MOZ_WIDGET_ANDROID
"android",
#elif MOZ_WIDGET_GONK
"gonk",
#else
"other",
#endif
isPlatformAndVersionAtLeast(platform, version) {
let platformVersion = Services.sysinfo.getProperty("version");
return platform == this.platform &&
Services.vc.compare(platformVersion, version) >= 0;
},
isPlatformAndVersionAtMost(platform, version) {
let platformVersion = Services.sysinfo.getProperty("version");
return platform == this.platform &&
Services.vc.compare(platformVersion, version) <= 0;
},
MOZ_CRASHREPORTER:
#ifdef MOZ_CRASHREPORTER
true,
#else
false,
#endif
MOZ_APP_VERSION: "@MOZ_APP_VERSION@",
ANDROID_PACKAGE_NAME: "@ANDROID_PACKAGE_NAME@",
});