зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1730924 - Upgrade ajv.js from 4.1.1 to 6.12.6 r=k88hudson
Differential Revision: https://phabricator.services.mozilla.com/D127625
This commit is contained in:
Родитель
63a10f1409
Коммит
db4ace8177
|
@ -7,7 +7,7 @@
|
|||
ChromeUtils.defineModuleGetter(
|
||||
this,
|
||||
"Ajv",
|
||||
"resource://testing-common/ajv-4.1.1.js"
|
||||
"resource://testing-common/ajv-6.12.6.js"
|
||||
);
|
||||
|
||||
const { TelemetryArchive } = ChromeUtils.import(
|
||||
|
|
|
@ -595,7 +595,7 @@ bool nsContentSecurityUtils::IsEvalAllowed(JSContext* cx,
|
|||
// Test-only third-party library
|
||||
"resource://testing-common/sinon-7.2.7.js"_ns,
|
||||
// Test-only third-party library
|
||||
"resource://testing-common/ajv-4.1.1.js"_ns,
|
||||
"resource://testing-common/ajv-6.12.6.js"_ns,
|
||||
// Test-only utility
|
||||
"resource://testing-common/content-task.js"_ns,
|
||||
|
||||
|
|
|
@ -97,7 +97,7 @@ XPCOMUtils.defineLazyGetter(this, "SyncPingSchema", function() {
|
|||
|
||||
XPCOMUtils.defineLazyGetter(this, "SyncPingValidator", function() {
|
||||
let ns = {};
|
||||
ChromeUtils.import("resource://testing-common/ajv-4.1.1.js", ns);
|
||||
ChromeUtils.import("resource://testing-common/ajv-6.12.6.js", ns);
|
||||
let ajv = new ns.Ajv({ async: "co*" });
|
||||
return ajv.compile(SyncPingSchema);
|
||||
});
|
||||
|
|
|
@ -1030,7 +1030,7 @@ var TPS = {
|
|||
// so we load Ajv manually.
|
||||
let ajvFile = this._getFileRelativeToSourceRoot(
|
||||
testFile,
|
||||
"testing/modules/ajv-4.1.1.js"
|
||||
"testing/modules/ajv-6.12.6.js"
|
||||
);
|
||||
let ajvURL = fileProtocolHandler.getURLSpecFromActualFile(ajvFile);
|
||||
let ns = {};
|
||||
|
|
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
|
@ -8,7 +8,7 @@ XPCSHELL_TESTS_MANIFESTS += ["tests/xpcshell/xpcshell.ini"]
|
|||
BROWSER_CHROME_MANIFESTS += ["tests/browser/browser.ini"]
|
||||
|
||||
TESTING_JS_MODULES += [
|
||||
"ajv-4.1.1.js",
|
||||
"ajv-6.12.6.js",
|
||||
"AppData.jsm",
|
||||
"AppInfo.jsm",
|
||||
"Assert.jsm",
|
||||
|
|
|
@ -17,7 +17,7 @@ ChromeUtils.defineModuleGetter(
|
|||
ChromeUtils.defineModuleGetter(
|
||||
this,
|
||||
"Ajv",
|
||||
"resource://testing-common/ajv-4.1.1.js"
|
||||
"resource://testing-common/ajv-6.12.6.js"
|
||||
);
|
||||
|
||||
XPCOMUtils.defineLazyGetter(this, "fetchSMASchema", async () => {
|
||||
|
|
|
@ -7,7 +7,7 @@ const { ASRouterTriggerListeners } = ChromeUtils.import(
|
|||
const { CFRMessageProvider } = ChromeUtils.import(
|
||||
"resource://activity-stream/lib/CFRMessageProvider.jsm"
|
||||
);
|
||||
const { Ajv } = ChromeUtils.import("resource://testing-common/ajv-4.1.1.js");
|
||||
const { Ajv } = ChromeUtils.import("resource://testing-common/ajv-6.12.6.js");
|
||||
|
||||
XPCOMUtils.defineLazyGetter(this, "fetchTriggerActionSchema", async () => {
|
||||
const response = await fetch(
|
||||
|
|
|
@ -19,7 +19,7 @@ XPCOMUtils.defineLazyModuleGetters(this, {
|
|||
FileTestUtils: "resource://testing-common/FileTestUtils.jsm",
|
||||
_RemoteSettingsExperimentLoader:
|
||||
"resource://nimbus/lib/RemoteSettingsExperimentLoader.jsm",
|
||||
Ajv: "resource://testing-common/ajv-4.1.1.js",
|
||||
Ajv: "resource://testing-common/ajv-6.12.6.js",
|
||||
sinon: "resource://testing-common/Sinon.jsm",
|
||||
FeatureManifest: "resource://nimbus/FeatureManifest.js",
|
||||
});
|
||||
|
|
|
@ -10,7 +10,7 @@ const { XPCOMUtils } = ChromeUtils.import(
|
|||
);
|
||||
XPCOMUtils.defineLazyModuleGetters(this, {
|
||||
ExperimentManager: "resource://nimbus/lib/ExperimentManager.jsm",
|
||||
Ajv: "resource://testing-common/ajv-4.1.1.js",
|
||||
Ajv: "resource://testing-common/ajv-6.12.6.js",
|
||||
ExperimentTestUtils: "resource://testing-common/NimbusTestUtils.jsm",
|
||||
RemoteDefaultsLoader:
|
||||
"resource://nimbus/lib/RemoteSettingsExperimentLoader.jsm",
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
|
||||
const { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm");
|
||||
const { sinon } = ChromeUtils.import("resource://testing-common/Sinon.jsm");
|
||||
const { Ajv } = ChromeUtils.import("resource://testing-common/ajv-6.12.6.js");
|
||||
const { XPCOMUtils } = ChromeUtils.import(
|
||||
"resource://gre/modules/XPCOMUtils.jsm"
|
||||
);
|
||||
|
|
|
@ -8,7 +8,6 @@ const {
|
|||
const { TestUtils } = ChromeUtils.import(
|
||||
"resource://testing-common/TestUtils.jsm"
|
||||
);
|
||||
const { Ajv } = ChromeUtils.import("resource://testing-common/ajv-4.1.1.js");
|
||||
|
||||
Cu.importGlobalProperties(["fetch"]);
|
||||
|
||||
|
|
|
@ -3,7 +3,6 @@
|
|||
const { FeatureManifest } = ChromeUtils.import(
|
||||
"resource://nimbus/FeatureManifest.js"
|
||||
);
|
||||
const { Ajv } = ChromeUtils.import("resource://testing-common/ajv-4.1.1.js");
|
||||
Cu.importGlobalProperties(["fetch"]);
|
||||
|
||||
XPCOMUtils.defineLazyGetter(this, "fetchSchema", async () => {
|
||||
|
@ -38,12 +37,5 @@ add_task(async function test_feature_manifest_is_valid() {
|
|||
if (!valid) {
|
||||
throwValidationError(featureId, errors);
|
||||
}
|
||||
|
||||
// Note: Because we're on an old version of ajv if/else isn't supported, see https://bugzilla.mozilla.org/show_bug.cgi?id=1730924
|
||||
if (entry.hasExposure && !entry.exposureDescription) {
|
||||
throwValidationError(featureId, {
|
||||
message: "Should have required property 'exposureDescription'",
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
"addonsreconciler.js": ["AddonsReconciler", "CHANGE_INSTALLED", "CHANGE_UNINSTALLED", "CHANGE_ENABLED", "CHANGE_DISABLED"],
|
||||
"AddonTestUtils.jsm": ["AddonTestUtils", "MockAsyncShutdown"],
|
||||
"addonutils.js": ["AddonUtils"],
|
||||
"ajv-4.1.1.js": ["Ajv"],
|
||||
"ajv-6.12.6.js": ["Ajv"],
|
||||
"AlertsHelper.jsm": [],
|
||||
"AppData.jsm": ["makeFakeAppDir"],
|
||||
"AppInfo.jsm": ["newAppInfo", "getAppInfo", "updateAppInfo"],
|
||||
|
|
|
@ -150,7 +150,7 @@ testing/gtest/gtest/
|
|||
testing/mochitest/MochiKit/
|
||||
testing/mochitest/pywebsocket3/
|
||||
testing/mochitest/tests/MochiKit-1.4.2/
|
||||
testing/modules/ajv-4.1.1.js
|
||||
testing/modules/ajv-6.12.6.js
|
||||
testing/modules/sinon-7.2.7.js
|
||||
testing/mozbase/mozproxy/mozproxy/backends/mitm/scripts/catapult/
|
||||
testing/talos/talos/tests/dromaeo/
|
||||
|
|
Загрузка…
Ссылка в новой задаче