mirror of
https://github.com/servo/servo.git
synced 2025-10-17 16:59:27 +01:00
Update web-platform-tests to revision 527a9287825118957bb7d94c098c448cef9d6982
This commit is contained in:
parent
b876168721
commit
ed25f52f43
289 changed files with 4880 additions and 2539 deletions
|
@ -19,7 +19,26 @@
|
|||
{conditions: {pattern: "[A-Z]{1}", value: "A"}, expected: false, name: "[target] The value attribute matches the pattern attribute"},
|
||||
{conditions: {pattern: "[A-Z]+", value: "\u0041\u0042\u0043"}, expected: false, name: "[target] The value(ABC) in unicode attribute matches the pattern attribute"},
|
||||
{conditions: {pattern: "[a-z]{3,}", value: "ABCD"}, expected: true, name: "[target] The value attribute mismatches the pattern attribute"},
|
||||
{conditions: {pattern: "[A-Z]+", value: "ABC123"}, expected: true, name: "[target] The value attribute mismatches the pattern attribute even when a subset matches"}
|
||||
{conditions: {pattern: "[A-Z]+", value: "ABC123"}, expected: true, name: "[target] The value attribute mismatches the pattern attribute even when a subset matches"},
|
||||
{conditions: {pattern: "(abc", value: "de"}, expected: false, name: "[target] Invalid regular expression gets ignored"},
|
||||
{conditions: {pattern: "a)(b", value: "de"}, expected: false, name: "[target] The pattern attribute tries to escape a group"},
|
||||
{conditions: {pattern: "a\\u{10FFFF}", value: "a\u{10FFFF}"}, expected: false, name: "[target] The pattern attribute uses Unicode features"},
|
||||
]
|
||||
},
|
||||
{
|
||||
tag: "input",
|
||||
types: ["email"],
|
||||
testData: [
|
||||
{conditions: {multiple: true, pattern: null, value: "abc,abc"}, expected: false, name: "[target] The pattern attribute is not set, if multiple is present"},
|
||||
{conditions: {multiple: true, pattern: "[A-Z]+", value: ""}, expected: false, name: "[target] The value attibute is empty string, if multiple is present"},
|
||||
{conditions: {multiple: true, pattern: "[A-Z]{1}", value: "A,A"}, expected: false, name: "[target] The value attribute matches the pattern attribute, if multiple is present"},
|
||||
{conditions: {multiple: true, pattern: "[A-Z]+", value: "\u0041\u0042\u0043,\u0041\u0042\u0043"}, expected: false, name: "[target] The value(ABC) in unicode attribute matches the pattern attribute, if multiple is present"},
|
||||
{conditions: {multiple: true, pattern: "[a-z]{3,}", value: "abcd,ABCD"}, expected: true, name: "[target] The value attribute mismatches the pattern attribute, if multiple is present"},
|
||||
{conditions: {multiple: true, pattern: "[A-Z]+", value: "ABCD,ABC123"}, expected: true, name: "[target] The value attribute mismatches the pattern attribute even when a subset matches, if multiple is present"},
|
||||
{conditions: {multiple: true, pattern: "(abc", value: "de,de"}, expected: false, name: "[target] Invalid regular expression gets ignored, if multiple is present"},
|
||||
{conditions: {multiple: true, pattern: "a)(b", value: "de,de"}, expected: false, name: "[target] The pattern attribute tries to escape a group, if multiple is present"},
|
||||
{conditions: {multiple: true, pattern: "a\\u{10FFFF}", value: "a\u{10FFFF},a\u{10FFFF}"}, expected: false, name: "[target] The pattern attribute uses Unicode features, if multiple is present"},
|
||||
{conditions: {multiple: true, pattern: "a,", value: "a,"}, expected: true, name: "[target] Commas should be stripped from regex input, if multiple is present"},
|
||||
]
|
||||
}
|
||||
];
|
||||
|
|
|
@ -41,10 +41,11 @@
|
|||
},
|
||||
//If an element is disabled, it is barred from constraint validation.
|
||||
//The willValidate attribute must be true if an element is mutable
|
||||
//If the readonly attribute is specified on an INPUT element, the element is barred from constraint validation.
|
||||
//If the readonly attribute is specified on an INPUT element, the element is barred from constraint validation
|
||||
//(with the assumption that the readonly attribute applies).
|
||||
{
|
||||
tag: "input",
|
||||
types: ["text", "search", "tel", "url", "email", "password", "datetime-local", "date", "month", "week", "time", "color", "file", "submit"],
|
||||
types: ["text", "search", "tel", "url", "email", "password", "datetime-local", "date", "month", "week", "time"],
|
||||
testData: [
|
||||
{conditions: {disabled: true}, expected: false, name: "[target] Must be barred from the constraint validation if it is disabled"},
|
||||
{conditions: {disabled: false, readOnly: false}, expected: true, name: "[target] The willValidate attribute must be true if an element is mutable"},
|
||||
|
@ -52,6 +53,17 @@
|
|||
{conditions: {disabled: false, readOnly: false}, expected: false, name: "[target] The willValidate attribute must be false if it has a datalist ancestor", ancestor: "datalist"},
|
||||
]
|
||||
},
|
||||
//In the following cases, the readonly attribute does not apply.
|
||||
{
|
||||
tag: "input",
|
||||
types: ["color", "file", "submit"],
|
||||
testData: [
|
||||
{conditions: {disabled: true}, expected: false, name: "[target] Must be barred from the constraint validation if it is disabled"},
|
||||
{conditions: {disabled: false, readOnly: false}, expected: true, name: "[target] The willValidate attribute must be true if an element is mutable"},
|
||||
{conditions: {readOnly: true}, expected: true, name: "[target] Must be not barred from the constraint validation even if it is readonly"},
|
||||
{conditions: {disabled: false, readOnly: false}, expected: false, name: "[target] The willValidate attribute must be false if it has a datalist ancestor", ancestor: "datalist"},
|
||||
]
|
||||
},
|
||||
{
|
||||
tag: "button",
|
||||
types: ["submit"],
|
||||
|
|
|
@ -0,0 +1,33 @@
|
|||
<!DOCTYPE html>
|
||||
<meta charset="utf-8">
|
||||
<link rel="author" title="Joey Arhar" href="mailto:jarhar@chromium.org">
|
||||
<link rel="help" href="https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#form-submission-2">
|
||||
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
|
||||
<iframe name=frame1 id=frame1></iframe>
|
||||
<form id=form1 target=frame1 action="does_not_exist.html">
|
||||
<button id=submitbutton type=submit>
|
||||
<span id=outerchild>
|
||||
<span id=innerchild>submit</span>
|
||||
</span>
|
||||
</button>
|
||||
</form>
|
||||
|
||||
<script>
|
||||
async_test(t => {
|
||||
window.addEventListener('load', () => {
|
||||
const frame1 = document.getElementById('frame1');
|
||||
frame1.addEventListener('load', t.step_func_done(() => {}));
|
||||
|
||||
const submitButton = document.getElementById('submitbutton');
|
||||
submitButton.addEventListener('click', event => {
|
||||
document.getElementById('outerchild').remove();
|
||||
document.getElementById('form1').submit();
|
||||
});
|
||||
|
||||
document.getElementById('innerchild').click();
|
||||
});
|
||||
}, 'This test will pass if a form navigation successfully occurs when clicking a child element of a <button type=submit> element with a onclick event handler which removes the button\'s child and then calls form.submit().');
|
||||
</script>
|
|
@ -0,0 +1,32 @@
|
|||
<!DOCTYPE html>
|
||||
<meta charset="utf-8">
|
||||
<link rel="author" title="Joey Arhar" href="mailto:jarhar@chromium.org">
|
||||
<link rel="help" href="https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#form-submission-2">
|
||||
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
|
||||
<iframe name=frame1 id=frame1></iframe>
|
||||
<form id=form1 target=frame1 action="does_not_exist.html">
|
||||
<button id=submitbutton type=submit>
|
||||
<span id=outerchild>
|
||||
<span id=innerchild>submit</span>
|
||||
</span>
|
||||
</button>
|
||||
</form>
|
||||
|
||||
<script>
|
||||
async_test(t => {
|
||||
window.addEventListener('load', () => {
|
||||
const frame1 = document.getElementById('frame1');
|
||||
frame1.addEventListener('load', t.step_func_done(() => {}));
|
||||
|
||||
const submitButton = document.getElementById('submitbutton');
|
||||
submitButton.addEventListener('click', event => {
|
||||
document.getElementById('outerchild').remove();
|
||||
});
|
||||
|
||||
document.getElementById('innerchild').click();
|
||||
});
|
||||
}, 'This test will pass if a form navigation successfully occurs when clicking a child element of a <button type=submit> element with a onclick event handler which removes the button\'s child.');
|
||||
</script>
|
Loading…
Add table
Add a link
Reference in a new issue