From 87e37e32a0d3ebcbdb4c1e6084646f09c5993d00 Mon Sep 17 00:00:00 2001 From: Luca Greco Date: Thu, 13 Sep 2018 15:33:12 +0000 Subject: [PATCH] Bug 1491024 - Rename userScripts manifest property to follow manifest property name conventions. r=mixedpuppy Differential Revision: https://phabricator.services.mozilla.com/D5777 --HG-- extra : source : f1cc448b5137c220962a35f1816f112f931de119 --- toolkit/components/extensions/ExtensionContent.jsm | 2 +- toolkit/components/extensions/schemas/user_scripts.json | 4 ++-- .../extensions/test/xpcshell/test_ext_userScripts.js | 4 ++-- .../test/xpcshell/test_ext_userScripts_telemetry.js | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/toolkit/components/extensions/ExtensionContent.jsm b/toolkit/components/extensions/ExtensionContent.jsm index 50cae1d0020d..87b99d58c898 100644 --- a/toolkit/components/extensions/ExtensionContent.jsm +++ b/toolkit/components/extensions/ExtensionContent.jsm @@ -536,7 +536,7 @@ class UserScript extends Script { // the particular userScript and it is passed as a parameter to the custom // userScripts APIs defined by the extension. this.scriptMetadata = matcher.userScriptOptions.scriptMetadata; - this.apiScriptURL = extension.manifest.userScripts && extension.manifest.userScripts.apiScript; + this.apiScriptURL = extension.manifest.user_scripts && extension.manifest.user_scripts.api_script; this.promiseAPIScript = null; this.scriptPromises = null; diff --git a/toolkit/components/extensions/schemas/user_scripts.json b/toolkit/components/extensions/schemas/user_scripts.json index b516ff890540..1f5741cef46a 100644 --- a/toolkit/components/extensions/schemas/user_scripts.json +++ b/toolkit/components/extensions/schemas/user_scripts.json @@ -9,11 +9,11 @@ { "$extend": "WebExtensionManifest", "properties": { - "userScripts": { + "user_scripts": { "type": "object", "optional": true, "properties": { - "apiScript": { "$ref": "manifest.ExtensionURL"} + "api_script": { "$ref": "manifest.ExtensionURL"} } } } diff --git a/toolkit/components/extensions/test/xpcshell/test_ext_userScripts.js b/toolkit/components/extensions/test/xpcshell/test_ext_userScripts.js index 01f433eb979c..01e03bb44568 100644 --- a/toolkit/components/extensions/test/xpcshell/test_ext_userScripts.js +++ b/toolkit/components/extensions/test/xpcshell/test_ext_userScripts.js @@ -299,8 +299,8 @@ add_task(async function test_userScripts_exported_APIs() { permissions: [ "http://localhost/*/file_sample.html", ], - userScripts: { - apiScript: "api-script.js", + user_scripts: { + api_script: "api-script.js", }, }, background, diff --git a/toolkit/components/extensions/test/xpcshell/test_ext_userScripts_telemetry.js b/toolkit/components/extensions/test/xpcshell/test_ext_userScripts_telemetry.js index bdda72626f81..680cf4636f16 100644 --- a/toolkit/components/extensions/test/xpcshell/test_ext_userScripts_telemetry.js +++ b/toolkit/components/extensions/test/xpcshell/test_ext_userScripts_telemetry.js @@ -40,8 +40,8 @@ add_task(async function test_userScripts_telemetry() { permissions: [ "http://*/*/file_sample.html", ], - userScripts: { - apiScript: "api-script.js", + user_scripts: { + api_script: "api-script.js", }, }, background,