Bug 1303469 - Stub form autofill system extension. r=rhelmer draft
authorMatthew Noorenberghe <mozilla@noorenberghe.ca>
Fri, 16 Sep 2016 16:11:28 -0700
changeset 414670 a12f29071588421b0c9ac0b560008abffb827341
parent 413960 29af101880db7ce7f5f87f58e1ff20988c1c5fc3
child 414671 9eee2d442bb4797dcfdf1ae189d6ca69a1b0b03a
push id29734
push usermozilla@noorenberghe.ca
push dateFri, 16 Sep 2016 23:40:27 +0000
reviewersrhelmer
bugs1303469
milestone51.0a1
Bug 1303469 - Stub form autofill system extension. r=rhelmer MozReview-Commit-ID: JXbUQdCwXN0
browser/extensions/formautofill/bootstrap.js
browser/extensions/formautofill/install.rdf.in
browser/extensions/formautofill/moz.build
browser/extensions/formautofill/test/browser/browser.ini
browser/extensions/formautofill/test/browser/browser_check_installed.js
browser/extensions/moz.build
browser/extensions/webcompat/install.rdf.in
copy from browser/extensions/webcompat/bootstrap.js
copy to browser/extensions/formautofill/bootstrap.js
--- a/browser/extensions/webcompat/bootstrap.js
+++ b/browser/extensions/formautofill/bootstrap.js
@@ -1,10 +1,10 @@
-/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
 /* 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/. */
 
-// for now we ship a stub, that can be upgraded as-needed after release
+"use strict";
+
 function startup() {}
 function shutdown() {}
 function install() {}
 function uninstall() {}
copy from browser/extensions/webcompat/install.rdf.in
copy to browser/extensions/formautofill/install.rdf.in
--- a/browser/extensions/webcompat/install.rdf.in
+++ b/browser/extensions/formautofill/install.rdf.in
@@ -4,29 +4,29 @@
    - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
 
 #filter substitution
 
 <RDF xmlns="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
      xmlns:em="http://www.mozilla.org/2004/em-rdf#">
 
   <Description about="urn:mozilla:install-manifest">
-    <em:id>webcompat@mozilla.org</em:id>
+    <em:id>formautofill@mozilla.org</em:id>
     <em:version>1.0</em:version>
     <em:type>2</em:type>
     <em:bootstrap>true</em:bootstrap>
     <em:multiprocessCompatible>true</em:multiprocessCompatible>
 
-    <!-- Target Application this theme can install into,
+    <!-- Target Application this extension can install into,
         with minimum and maximum supported versions. -->
     <em:targetApplication>
       <Description>
         <em:id>{ec8030f7-c20a-464f-9b0e-13a3a9e97384}</em:id>
         <em:minVersion>@MOZ_APP_VERSION@</em:minVersion>
         <em:maxVersion>@MOZ_APP_MAXVERSION@</em:maxVersion>
       </Description>
     </em:targetApplication>
 
     <!-- Front End MetaData -->
-    <em:name>Web Compat</em:name>
-    <em:description>Urgent post-release fixes for web compatibility.</em:description>
+    <em:name>Form Autofill</em:name>
+    <em:description>Autofill forms with saved profiles</em:description>
   </Description>
 </RDF>
copy from browser/extensions/webcompat/moz.build
copy to browser/extensions/formautofill/moz.build
--- a/browser/extensions/webcompat/moz.build
+++ b/browser/extensions/formautofill/moz.build
@@ -2,17 +2,17 @@
 # vim: set filetype=python:
 # 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/.
 
 DEFINES['MOZ_APP_VERSION'] = CONFIG['MOZ_APP_VERSION']
 DEFINES['MOZ_APP_MAXVERSION'] = CONFIG['MOZ_APP_MAXVERSION']
 
-FINAL_TARGET_FILES.features['webcompat@mozilla.org'] += [
+FINAL_TARGET_FILES.features['formautofill@mozilla.org'] += [
   'bootstrap.js'
 ]
 
-FINAL_TARGET_PP_FILES.features['webcompat@mozilla.org'] += [
+FINAL_TARGET_PP_FILES.features['formautofill@mozilla.org'] += [
   'install.rdf.in'
 ]
 
-BROWSER_CHROME_MANIFESTS += ['test/browser.ini']
+BROWSER_CHROME_MANIFESTS += ['test/browser/browser.ini']
copy from browser/extensions/webcompat/test/browser.ini
copy to browser/extensions/formautofill/test/browser/browser.ini
--- a/browser/extensions/webcompat/test/browser.ini
+++ b/browser/extensions/formautofill/test/browser/browser.ini
@@ -1,3 +1,3 @@
 [DEFAULT]
 
-[browser_webcompat_stub_check.js]
+[browser_check_installed.js]
copy from browser/extensions/webcompat/test/browser_webcompat_stub_check.js
copy to browser/extensions/formautofill/test/browser/browser_check_installed.js
--- a/browser/extensions/webcompat/test/browser_webcompat_stub_check.js
+++ b/browser/extensions/formautofill/test/browser/browser_check_installed.js
@@ -1,15 +1,14 @@
 "use strict";
 
-// make sure that the stub is present and enabled
-add_task(function* stub_enabled() {
+add_task(function* test_enabled() {
   let addon = yield new Promise(
-    resolve => AddonManager.getAddonByID("webcompat@mozilla.org", resolve)
+    resolve => AddonManager.getAddonByID("formautofill@mozilla.org", resolve)
   );
-  isnot(addon, null, "Webcompat stub addon should exist");
-  is(addon.version, "1.0");
-  is(addon.name, "Web Compat");
-  ok(addon.isCompatible, "Webcompat stub addon is compatible with Firefox");
-  ok(!addon.appDisabled, "Webcompat stub addon is not app disabled");
-  ok(addon.isActive, "Webcompat stub addon is active");
-  is(addon.type, "extension", "Webcompat stub addon is type extension");
+  isnot(addon, null, "Check addon exists");
+  is(addon.version, "1.0", "Check version");
+  is(addon.name, "Form Autofill", "Check name");
+  ok(addon.isCompatible, "Check application compatibility");
+  ok(!addon.appDisabled, "Check not app disabled");
+  ok(addon.isActive, "Check addon is active");
+  is(addon.type, "extension", "Check type is 'extension'");
 });
--- a/browser/extensions/moz.build
+++ b/browser/extensions/moz.build
@@ -10,9 +10,10 @@ DIRS += [
     'pocket',
     'webcompat',
 ]
 
 # Only include the following system add-ons if building Aurora or Nightly
 if 'a' in CONFIG['GRE_MILESTONE']:
     DIRS += [
         'flyweb',
+        'formautofill',
     ]
--- a/browser/extensions/webcompat/install.rdf.in
+++ b/browser/extensions/webcompat/install.rdf.in
@@ -10,17 +10,17 @@
 
   <Description about="urn:mozilla:install-manifest">
     <em:id>webcompat@mozilla.org</em:id>
     <em:version>1.0</em:version>
     <em:type>2</em:type>
     <em:bootstrap>true</em:bootstrap>
     <em:multiprocessCompatible>true</em:multiprocessCompatible>
 
-    <!-- Target Application this theme can install into,
+    <!-- Target Application this extension can install into,
         with minimum and maximum supported versions. -->
     <em:targetApplication>
       <Description>
         <em:id>{ec8030f7-c20a-464f-9b0e-13a3a9e97384}</em:id>
         <em:minVersion>@MOZ_APP_VERSION@</em:minVersion>
         <em:maxVersion>@MOZ_APP_MAXVERSION@</em:maxVersion>
       </Description>
     </em:targetApplication>