Bug 1322622 - Load form autofill JSMs from the built files and move JSMs out of content/. r=steveck

MozReview-Commit-ID: 4DDsDlw4Jr3

--HG--
rename : browser/extensions/formautofill/content/FormAutofillContent.jsm => browser/extensions/formautofill/FormAutofillContent.jsm
rename : browser/extensions/formautofill/content/FormAutofillParent.jsm => browser/extensions/formautofill/FormAutofillParent.jsm
rename : browser/extensions/formautofill/content/ProfileStorage.jsm => browser/extensions/formautofill/ProfileStorage.jsm
extra : rebase_source : 87e6bee2cb6207138400e2f92f9cf8245394cbb4
This commit is contained in:
Matthew Noorenberghe 2016-12-16 01:23:48 -05:00
Родитель 0029708101
Коммит ec36746143
7 изменённых файлов: 15 добавлений и 15 удалений

Просмотреть файл

@ -3,5 +3,5 @@
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
[features/formautofill@mozilla.org] chrome.jar:
% resource formautofill %content/
content/ (content/*)
% resource formautofill %res/
res/ (*.jsm)

Просмотреть файл

@ -18,11 +18,18 @@ XPCOMUtils.defineLazyModuleGetter(this, "DownloadPaths",
XPCOMUtils.defineLazyModuleGetter(this, "FileUtils",
"resource://gre/modules/FileUtils.jsm");
// Register the resource path of formautofill
let resHandler = Services.io.getProtocolHandler("resource")
.QueryInterface(Ci.nsISubstitutingProtocolHandler);
let dataURI = NetUtil.newURI(do_get_file(".", true));
resHandler.setSubstitution("formautofill", dataURI);
// Load our bootstrap extension manifest so we can access our chrome/resource URIs.
const EXTENSION_ID = "formautofill@mozilla.org";
let extensionDir = Services.dirsvc.get("GreD", Ci.nsIFile);
extensionDir.append("browser");
extensionDir.append("features");
extensionDir.append(EXTENSION_ID);
// If the unpacked extension doesn't exist, use the packed version.
if (!extensionDir.exists()) {
extensionDir = extensionDir.parent;
extensionDir.append(EXTENSION_ID + ".xpi");
}
Components.manager.addBootstrappedManifestLocation(extensionDir);
// While the previous test file should have deleted all the temporary files it
// used, on Windows these might still be pending deletion on the physical file

Просмотреть файл

@ -2,9 +2,4 @@
* Cleans up the testing environment.
*/
/* global resHandler */
"use strict";
// Unregister the resource path of formautofill.
resHandler.setSubstitution("formautofill", null);

Просмотреть файл

@ -1,10 +1,8 @@
[DEFAULT]
firefox-appdir = browser
head = head.js
tail = tail.js
support-files =
../../content/FormAutofillContent.jsm
../../content/FormAutofillParent.jsm
../../content/ProfileStorage.jsm
[test_autofillFormFields.js]
[test_collectFormFields.js]