add mock data to result draft
authorRay Lin <ralin@mozilla.com>
Mon, 20 Feb 2017 14:38:58 +0800
changeset 500346 cd6d80e9cac9564d8cc60578f7e1b74bae84eb3b
parent 500240 39607304b774591fa6e32c4b06158d869483c312
child 500347 593f965bdf322f030de5ab393ea8a94cb7dcbb3a
push id49697
push userbmo:ralin@mozilla.com
push dateFri, 17 Mar 2017 03:30:48 +0000
milestone55.0a1
add mock data to result MozReview-Commit-ID: HtrsgGDytwh
browser/extensions/formautofill/ProfileStorage.jsm
--- a/browser/extensions/formautofill/ProfileStorage.jsm
+++ b/browser/extensions/formautofill/ProfileStorage.jsm
@@ -69,29 +69,35 @@ const VALID_FIELDS = [
   "address-level1",
   "postal-code",
   "country",
   "tel",
   "email",
 ];
 
 // TODO: Remove this once we can add profile from preference.
-const MOCK_MODE = false;
+const MOCK_MODE = true;
 const MOCK_STORAGE = [{
-  guid: "test-guid-1",
-  organization: "Sesame Street",
-  "street-address": "123 Sesame Street.",
-  tel: "1-345-345-3456",
+  organization: "World Wide Web Consortium",
+  "street-address": "32 Vassar Street\nMIT Room 32-G524",
+  "address-level2": "Cambridge",
+  "address-level1": "MA",
+  "postal-code": "02139",
+  country: "US",
+  tel: "+1 617 253 5702",
+  email: "timbl@w3.org",
 }, {
-  guid: "test-guid-2",
-  organization: "Mozilla",
-  "street-address": "331 E. Evelyn Avenue",
-  tel: "1-650-903-0800",
+  "street-address": "Some Address",
+  country: "US",
+}, {
+  "street-address": "Other Address",
+  "postal-code": "12345",
 }];
 
+
 function ProfileStorage(path) {
   this._path = path;
 }
 
 ProfileStorage.prototype = {
   // These fields are defined internally for each profile.
   INTERNAL_FIELDS:
     ["guid", "timeCreated", "timeLastUsed", "timeLastModified", "timesUsed"],