Bug 1583957 - Indicate support for autocomplete=(username|new-password|current-password). r=farre

Bug 917325 started using the `username` token.
Bug 1119063 started using the `new-password` token. This patch also adds support for `current-password` since it's the counterpart to `new-password` and we plan to use it as a signal eventually so want to encourage its use.

Differential Revision: https://phabricator.services.mozilla.com/D50351

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Matthew Noorenberghe 2019-10-24 12:45:24 +00:00
Родитель 9502c5460b
Коммит 19fc89710d
4 изменённых файлов: 8 добавлений и 18 удалений

Просмотреть файл

@ -61,9 +61,6 @@ AUTOCOMPLETE_UNSUPPORTED_FIELD_NAME(HONORIFIX_PREFIX, "honorifix-prefix")
AUTOCOMPLETE_UNSUPPORTED_FIELD_NAME(HONORIFIX_SUFFIX, "honorifix-suffix")
AUTOCOMPLETE_UNSUPPORTED_FIELD_NAME(NICKNAME, "nickname")
AUTOCOMPLETE_UNSUPPORTED_FIELD_NAME(ORGANIZATION_TITLE, "organization-title")
AUTOCOMPLETE_UNSUPPORTED_FIELD_NAME(USERNAME, "username")
AUTOCOMPLETE_UNSUPPORTED_FIELD_NAME(NEW_PASSWORD, "new-password")
AUTOCOMPLETE_UNSUPPORTED_FIELD_NAME(CURRENT_PASSWORD, "current-password")
AUTOCOMPLETE_UNSUPPORTED_FIELD_NAME(ADDRESS_LEVEL4, "address-level4")
AUTOCOMPLETE_UNSUPPORTED_FIELD_NAME(CC_GIVEN_NAME, "cc-given-name")
AUTOCOMPLETE_UNSUPPORTED_FIELD_NAME(CC_ADDITIONAL_NAME, "cc-additional-name")

Просмотреть файл

@ -24,10 +24,11 @@ var values = [
["OFF", "off"],
["name", "name"],
[" name ", "name"],
["username", ""],
[" username ", ""],
["username", "username"],
[" username ", "username"],
["cc-csc", ""],
["language", ""],
[" language ", ""],
["tel-extension", ""],
["foobar", ""],
["section-blue", ""],

Просмотреть файл

@ -32,13 +32,14 @@ var values = [
["off", {fieldName: "off", canAutomaticallyPersist: false}, "off" ],
["name", {fieldName: "name" }, "name"],
[" name ", {fieldName: "name" }, "name"],
["username", {fieldName: "username"}, ""],
[" username ", {fieldName: "username"}, ""],
["current-password", {fieldName: "current-password", canAutomaticallyPersist: false}, ""],
["new-password", {fieldName: "new-password", canAutomaticallyPersist: false}, ""],
["username", {fieldName: "username"}, "username"],
[" username ", {fieldName: "username"}, "username"],
["current-password", {fieldName: "current-password", canAutomaticallyPersist: false}, "current-password"],
["new-password", {fieldName: "new-password", canAutomaticallyPersist: false}, "new-password"],
["cc-number", {fieldName: "cc-number", canAutomaticallyPersist: false}, "cc-number"],
["cc-csc", {fieldName: "cc-csc", canAutomaticallyPersist: false}, ""],
["language", {fieldName: "language"}, ""],
[" language ", {fieldName: "language"}, ""],
["tel-extension", {fieldName: "tel-extension"}, ""],
["foobar", {}, ""],
["section-blue", {}, ""],

Просмотреть файл

@ -58,15 +58,6 @@
[impp is an allowed autocomplete field name]
expected: FAIL
[username is an allowed autocomplete field name]
expected: FAIL
[new-password is an allowed autocomplete field name]
expected: FAIL
[current-password is an allowed autocomplete field name]
expected: FAIL
[address-level4 is an allowed autocomplete field name]
expected: FAIL