Commit ab9410b4 authored by Otto Länd's avatar Otto Länd
Browse files

Bug 1833618: apply code formatting via Lando

# ignore-this-changeset
parent 97c7d3f6
Loading
Loading
Loading
Loading
+1 −4
Original line number Diff line number Diff line
@@ -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",
+2 −1
Original line number Diff line number Diff line
@@ -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>
+5 −8
Original line number Diff line number Diff line
@@ -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" },
          ],
        },
        {
@@ -109,10 +109,7 @@ add_heuristic_tests(
            reason: "autocomplete",
            contactType: "home",
          },
          fields: [
            { fieldName: "tel" },
            { fieldName: "email" },
          ],
          fields: [{ fieldName: "tel" }, { fieldName: "email" }],
        },
      ],
    },
+35 −35
Original line number Diff line number Diff line
@@ -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",
        },
@@ -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",
        },
@@ -68,5 +69,4 @@ add_heuristic_tests(
      },
    ],
  },
  ]
);
]);
+52 −55
Original line number Diff line number Diff line
@@ -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: `
@@ -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" }],
      },
    ],
  },
@@ -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" },
@@ -78,5 +76,4 @@ add_heuristic_tests(
      },
    ],
  },
  ]
);
]);
Loading