// Two tokens + WebAuthn credential type
["fax url webauthn", ""],
["shipping tel webauthn", "shipping tel webauthn"],
// Three tokens
["billing invalid tel", ""],
["___ mobile tel", ""],
["mobile foo tel", ""],
["mobile tel foo", ""],
["tel mobile billing", ""],
["billing mobile tel", "billing mobile tel"],
[" BILLing MoBiLE tEl ", "billing mobile tel"],
["billing home tel", "billing home tel"],
["home section-blue tel", ""],
["setion-blue work email", ""],
["section-blue home address-level2", ""],
["section-blue shipping name", "section-blue shipping name"],
["section-blue mobile tel", "section-blue mobile tel"],
["shipping webauthn tel", ""],
// Three tokens + WebAuthn credential type
["invalid mobile tel webauthn", ""],
["section-blue shipping name webauthn", "section-blue shipping name webauthn"],
// Four tokens
["billing billing mobile tel", ""],
["name section-blue shipping home", ""],
["secti shipping work address-line1", ""],
["section-blue shipping home name", ""],
["section-blue shipping mobile tel", "section-blue shipping mobile tel"],
["section-blue webauthn mobile tel", ""],
// Four tokens + WebAuthn credential type
["section-blue shipping home name webauthn", ""],
["section-blue shipping mobile tel webauthn", "section-blue shipping mobile tel webauthn"],
// Five tokens (invalid)
["billing billing billing mobile tel", ""],
["section-blue section-blue billing mobile tel", ""],
["section-blue section-blue billing webauthn tel", ""],
// Five tokens + WebAuthn credential type (invalid)
["billing billing billing mobile tel webauthn", ""],
];
var types = [undefined, "hidden", "text", "search"]; // Valid types for all non-multiline hints.
function checkAutocompleteValues(field, type) {
for (var test of values) {
if (typeof(test[0]) === "undefined")
field.removeAttribute("autocomplete");
else
field.setAttribute("autocomplete", test[0]);
is(field.autocomplete, test[1], "Checking @autocomplete for @type=" + type + " of: " + test[0]);
is(field.autocomplete, test[1], "Checking cached @autocomplete for @type=" + type + " of: " + test[0]);
}
}
function start() { var inputField = document.getElementById("input-field");
for (var type of types) {
// Switch the input type
if (typeof(type) === "undefined")
inputField.removeAttribute("type");
else
inputField.type = type;
checkAutocompleteValues(inputField, type || "");
}
var selectField = document.getElementById("select-field");
checkAutocompleteValues(selectField, "select");
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.