Update web-platform-tests to revision 7da6acfd668e66adae5ab4e2d389810d3b1460be

This commit is contained in:
James Graham 2015-10-05 17:15:15 +01:00
parent 50db64a20e
commit bae87d193d
307 changed files with 35826 additions and 209 deletions

View file

@ -120,11 +120,20 @@
},
{
tag: "input",
types: ["checkbox", "radio"],
types: ["checkbox"],
testData: [
{conditions: {required: false, checked: false, name: "test1"}, expected: false, name: "[target] The required attribute is not set"},
{conditions: {required: true, checked: true, name: "test1"}, expected: false, name: "[target] The checked attribute is true"},
{conditions: {required: true, checked: false, name: "test1"}, expected: true, name: "[target] The checked attribute is false"}
{conditions: {required: true, checked: true, name: "test2"}, expected: false, name: "[target] The checked attribute is true"},
{conditions: {required: true, checked: false, name: "test3"}, expected: true, name: "[target] The checked attribute is false"}
]
},
{
tag: "input",
types: ["radio"],
testData: [
{conditions: {required: false, checked: false, name: "test4"}, expected: false, name: "[target] The required attribute is not set"},
{conditions: {required: true, checked: true, name: "test5"}, expected: false, name: "[target] The checked attribute is true"},
{conditions: {required: true, checked: false, name: "test6"}, expected: true, name: "[target] The checked attribute is false"}
]
},
{

View file

@ -290,10 +290,24 @@ var validator = {
var old_value = ctl.value;
ctl.value = "a";
ctl.value = old_value;
if (ctl.type !== 'email') {
ctl.setSelectionRange(ctl.value.length, ctl.value.length);
if (
// See https://html.spec.whatwg.org/multipage/#input-type-attr-summary
// and https://html.spec.whatwg.org/multipage/#textFieldSelection
(
ctl.tagName === "INPUT" && (
ctl.type === "text" ||
ctl.type === "search" ||
ctl.type === "tel" ||
ctl.type === "url" ||
ctl.type === "password"
)
) ||
ctl.tagName === "TEXTAREA"
) {
ctl.value += "1";
ctl.setSelectionRange(ctl.value.length - 1, ctl.value.length);
document.execCommand("Delete");
}
document.execCommand("Delete");
document.designMode = "off";
},