mirror of
https://github.com/servo/servo.git
synced 2025-08-05 21:50:18 +01:00
Update web-platform-tests to revision 7da6acfd668e66adae5ab4e2d389810d3b1460be
This commit is contained in:
parent
50db64a20e
commit
bae87d193d
307 changed files with 35826 additions and 209 deletions
|
@ -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"}
|
||||
]
|
||||
},
|
||||
{
|
||||
|
|
|
@ -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";
|
||||
},
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue