From 6bf0a5cb5034a7e684dcc3500e841785237ce2dd Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 7 Apr 2024 19:32:43 +0200 Subject: Adding upstream version 1:115.7.0. Signed-off-by: Daniel Baumann --- .../test/browser/heuristics/browser_basic.js | 69 ++++++++++++++++++++++ 1 file changed, 69 insertions(+) create mode 100644 browser/extensions/formautofill/test/browser/heuristics/browser_basic.js (limited to 'browser/extensions/formautofill/test/browser/heuristics/browser_basic.js') diff --git a/browser/extensions/formautofill/test/browser/heuristics/browser_basic.js b/browser/extensions/formautofill/test/browser/heuristics/browser_basic.js new file mode 100644 index 0000000000..fda375a146 --- /dev/null +++ b/browser/extensions/formautofill/test/browser/heuristics/browser_basic.js @@ -0,0 +1,69 @@ +/* global add_heuristic_tests */ + +"use strict"; + +add_heuristic_tests( + [ + { + fixturePath: "autocomplete_basic.html", + expectedResult: [ + { + default: { + reason: "autocomplete", + }, + fields: [ + { fieldName: "organization" }, + { fieldName: "street-address" }, + { fieldName: "address-level2" }, + { fieldName: "address-level1" }, + { fieldName: "postal-code" }, + { fieldName: "country" }, + { fieldName: "tel" }, + { fieldName: "email" }, + ], + }, + { + default: { + reason: "regex-heuristic", + }, + fields: [ + { fieldName: "organization" }, + { fieldName: "address-line1" }, + { fieldName: "address-line2" }, + { fieldName: "address-line3" }, + { fieldName: "address-level2" }, + { fieldName: "address-level1" }, + { fieldName: "postal-code" }, + { fieldName: "country" }, + { fieldName: "tel" }, + { fieldName: "email" }, + ], + }, + { + default: { + reason: "autocomplete", + }, + fields: [ + { fieldName: "cc-number" }, + { fieldName: "cc-name" }, + { fieldName: "cc-exp-month" }, + { fieldName: "cc-exp-year" }, + ], + }, + { + default: { + reason: "regex-heuristic", + }, + fields: [ + { fieldName: "address-line1" }, + { fieldName: "address-level2" }, + { fieldName: "address-line2" }, + { fieldName: "organization" }, + { fieldName: "address-line3" }, + ], + }, + ], + }, + ], + "fixtures/" +); -- cgit v1.2.3