зеркало из https://github.com/mozilla/gecko-dev.git
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:
Родитель
0029708101
Коммит
ec36746143
|
@ -3,5 +3,5 @@
|
||||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||||
|
|
||||||
[features/formautofill@mozilla.org] chrome.jar:
|
[features/formautofill@mozilla.org] chrome.jar:
|
||||||
% resource formautofill %content/
|
% resource formautofill %res/
|
||||||
content/ (content/*)
|
res/ (*.jsm)
|
||||||
|
|
|
@ -18,11 +18,18 @@ XPCOMUtils.defineLazyModuleGetter(this, "DownloadPaths",
|
||||||
XPCOMUtils.defineLazyModuleGetter(this, "FileUtils",
|
XPCOMUtils.defineLazyModuleGetter(this, "FileUtils",
|
||||||
"resource://gre/modules/FileUtils.jsm");
|
"resource://gre/modules/FileUtils.jsm");
|
||||||
|
|
||||||
// Register the resource path of formautofill
|
// Load our bootstrap extension manifest so we can access our chrome/resource URIs.
|
||||||
let resHandler = Services.io.getProtocolHandler("resource")
|
const EXTENSION_ID = "formautofill@mozilla.org";
|
||||||
.QueryInterface(Ci.nsISubstitutingProtocolHandler);
|
let extensionDir = Services.dirsvc.get("GreD", Ci.nsIFile);
|
||||||
let dataURI = NetUtil.newURI(do_get_file(".", true));
|
extensionDir.append("browser");
|
||||||
resHandler.setSubstitution("formautofill", dataURI);
|
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
|
// 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
|
// used, on Windows these might still be pending deletion on the physical file
|
||||||
|
|
|
@ -2,9 +2,4 @@
|
||||||
* Cleans up the testing environment.
|
* Cleans up the testing environment.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* global resHandler */
|
|
||||||
|
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
// Unregister the resource path of formautofill.
|
|
||||||
resHandler.setSubstitution("formautofill", null);
|
|
||||||
|
|
|
@ -1,10 +1,8 @@
|
||||||
[DEFAULT]
|
[DEFAULT]
|
||||||
|
firefox-appdir = browser
|
||||||
head = head.js
|
head = head.js
|
||||||
tail = tail.js
|
tail = tail.js
|
||||||
support-files =
|
support-files =
|
||||||
../../content/FormAutofillContent.jsm
|
|
||||||
../../content/FormAutofillParent.jsm
|
|
||||||
../../content/ProfileStorage.jsm
|
|
||||||
|
|
||||||
[test_autofillFormFields.js]
|
[test_autofillFormFields.js]
|
||||||
[test_collectFormFields.js]
|
[test_collectFormFields.js]
|
||||||
|
|
Загрузка…
Ссылка в новой задаче