Loading browser/extensions/formautofill/test/browser/heuristics/browser_cc_exp.js +1 −4 Original line number Diff line number Diff line Loading @@ -24,10 +24,7 @@ add_heuristic_tests( default: { reason: "autocomplete", }, fields: [ { fieldName: "cc-number" }, { fieldName: "cc-exp" }, ], fields: [{ fieldName: "cc-number" }, { fieldName: "cc-exp" }], }, { description: "form3", Loading browser/extensions/formautofill/test/browser/heuristics/browser_ignore_invisible_fields.js +2 −1 Original line number Diff line number Diff line Loading @@ -77,7 +77,8 @@ add_heuristic_tests([ }, { // hidden and style="display:none" are always considered regardless what visibility check we use description: "invisible fields are identified because number of elemenent in the form exceed the threshold", description: "invisible fields are identified because number of elemenent in the form exceed the threshold", prefs: [["extensions.formautofill.heuristics.visibilityCheckThreshold", 1]], fixtureData: ` <html> Loading browser/extensions/formautofill/test/browser/heuristics/browser_multiple_section.js +5 −8 Original line number Diff line number Diff line Loading @@ -59,8 +59,8 @@ add_heuristic_tests( // Even the `contactType` of these two fields are different with the // above two, we still consider they are identical until supporting // multiple phone number and email in one profile. {"fieldName": "tel", "contactType": "home"}, {"fieldName": "email", "contactType": "home"}, { fieldName: "tel", contactType: "home" }, { fieldName: "email", contactType: "home" }, ], }, { Loading Loading @@ -109,10 +109,7 @@ add_heuristic_tests( reason: "autocomplete", contactType: "home", }, fields: [ { fieldName: "tel" }, { fieldName: "email" }, ], fields: [{ fieldName: "tel" }, { fieldName: "email" }], }, ], }, Loading browser/extensions/formautofill/test/browser/heuristics/browser_parseAddressFields.js +35 −35 Original line number Diff line number Diff line Loading @@ -33,13 +33,13 @@ const markup2 = ` </html> `; add_heuristic_tests( [ add_heuristic_tests([ { fixtureData: markup1, expectedResult: [ { description: "Address Line1 in the last element and is not updated in _parsedAddressFields", description: "Address Line1 in the last element and is not updated in _parsedAddressFields", default: { reason: "regex-heuristic", }, Loading @@ -55,7 +55,8 @@ add_heuristic_tests( fixtureData: markup2, expectedResult: [ { description: "Address Line2 in the last element and is not updated in _parsedAddressFields", description: "Address Line2 in the last element and is not updated in _parsedAddressFields", default: { reason: "regex-heuristic", }, Loading @@ -68,5 +69,4 @@ add_heuristic_tests( }, ], }, ] ); ]); browser/extensions/formautofill/test/browser/heuristics/browser_section_validation_address.js +52 −55 Original line number Diff line number Diff line Loading @@ -5,8 +5,7 @@ http://creativecommons.org/publicdomain/zero/1.0/ */ "use strict"; add_heuristic_tests( [ add_heuristic_tests([ { description: `An address section is valid when it only contains more than three fields`, fixtureData: ` Loading Loading @@ -51,9 +50,7 @@ add_heuristic_tests( { description: "A section with one field", invalid: true, fields: [ { fieldName: "postal-code", reason: "autocomplete" }, ], fields: [{ fieldName: "postal-code", reason: "autocomplete" }], }, ], }, Loading @@ -68,7 +65,8 @@ add_heuristic_tests( `, expectedResult: [ { description: "A section with three fields but has duplicated email fields", description: "A section with three fields but has duplicated email fields", invalid: true, fields: [ { fieldName: "postal-code", reason: "autocomplete" }, Loading @@ -78,5 +76,4 @@ add_heuristic_tests( }, ], }, ] ); ]); Loading
browser/extensions/formautofill/test/browser/heuristics/browser_cc_exp.js +1 −4 Original line number Diff line number Diff line Loading @@ -24,10 +24,7 @@ add_heuristic_tests( default: { reason: "autocomplete", }, fields: [ { fieldName: "cc-number" }, { fieldName: "cc-exp" }, ], fields: [{ fieldName: "cc-number" }, { fieldName: "cc-exp" }], }, { description: "form3", Loading
browser/extensions/formautofill/test/browser/heuristics/browser_ignore_invisible_fields.js +2 −1 Original line number Diff line number Diff line Loading @@ -77,7 +77,8 @@ add_heuristic_tests([ }, { // hidden and style="display:none" are always considered regardless what visibility check we use description: "invisible fields are identified because number of elemenent in the form exceed the threshold", description: "invisible fields are identified because number of elemenent in the form exceed the threshold", prefs: [["extensions.formautofill.heuristics.visibilityCheckThreshold", 1]], fixtureData: ` <html> Loading
browser/extensions/formautofill/test/browser/heuristics/browser_multiple_section.js +5 −8 Original line number Diff line number Diff line Loading @@ -59,8 +59,8 @@ add_heuristic_tests( // Even the `contactType` of these two fields are different with the // above two, we still consider they are identical until supporting // multiple phone number and email in one profile. {"fieldName": "tel", "contactType": "home"}, {"fieldName": "email", "contactType": "home"}, { fieldName: "tel", contactType: "home" }, { fieldName: "email", contactType: "home" }, ], }, { Loading Loading @@ -109,10 +109,7 @@ add_heuristic_tests( reason: "autocomplete", contactType: "home", }, fields: [ { fieldName: "tel" }, { fieldName: "email" }, ], fields: [{ fieldName: "tel" }, { fieldName: "email" }], }, ], }, Loading
browser/extensions/formautofill/test/browser/heuristics/browser_parseAddressFields.js +35 −35 Original line number Diff line number Diff line Loading @@ -33,13 +33,13 @@ const markup2 = ` </html> `; add_heuristic_tests( [ add_heuristic_tests([ { fixtureData: markup1, expectedResult: [ { description: "Address Line1 in the last element and is not updated in _parsedAddressFields", description: "Address Line1 in the last element and is not updated in _parsedAddressFields", default: { reason: "regex-heuristic", }, Loading @@ -55,7 +55,8 @@ add_heuristic_tests( fixtureData: markup2, expectedResult: [ { description: "Address Line2 in the last element and is not updated in _parsedAddressFields", description: "Address Line2 in the last element and is not updated in _parsedAddressFields", default: { reason: "regex-heuristic", }, Loading @@ -68,5 +69,4 @@ add_heuristic_tests( }, ], }, ] ); ]);
browser/extensions/formautofill/test/browser/heuristics/browser_section_validation_address.js +52 −55 Original line number Diff line number Diff line Loading @@ -5,8 +5,7 @@ http://creativecommons.org/publicdomain/zero/1.0/ */ "use strict"; add_heuristic_tests( [ add_heuristic_tests([ { description: `An address section is valid when it only contains more than three fields`, fixtureData: ` Loading Loading @@ -51,9 +50,7 @@ add_heuristic_tests( { description: "A section with one field", invalid: true, fields: [ { fieldName: "postal-code", reason: "autocomplete" }, ], fields: [{ fieldName: "postal-code", reason: "autocomplete" }], }, ], }, Loading @@ -68,7 +65,8 @@ add_heuristic_tests( `, expectedResult: [ { description: "A section with three fields but has duplicated email fields", description: "A section with three fields but has duplicated email fields", invalid: true, fields: [ { fieldName: "postal-code", reason: "autocomplete" }, Loading @@ -78,5 +76,4 @@ add_heuristic_tests( }, ], }, ] ); ]);