mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
Update web-platform-tests to revision 71a0d51d14d8b0f1b53cda3a7d39ef8765164485
This commit is contained in:
parent
d504015496
commit
163009575a
290 changed files with 2928 additions and 972 deletions
|
@ -273,14 +273,16 @@ var validator = {
|
|||
},
|
||||
|
||||
set_dirty: function(ctl) {
|
||||
document.disgnMode = "on";
|
||||
document.designMode = "on";
|
||||
ctl.focus();
|
||||
var old_value = ctl.value;
|
||||
ctl.value = "a";
|
||||
ctl.value = old_value;
|
||||
ctl.setSelectionRange(ctl.value.length, ctl.value.length);
|
||||
if (ctl.type !== 'email') {
|
||||
ctl.setSelectionRange(ctl.value.length, ctl.value.length);
|
||||
}
|
||||
document.execCommand("Delete");
|
||||
document.disgnMode = "off";
|
||||
document.designMode = "off";
|
||||
},
|
||||
|
||||
pre_check: function(ctl, item) {
|
||||
|
|
|
@ -0,0 +1,30 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>ValidityState.tooLong and user editing</title>
|
||||
<link rel="author" title="Chris Rebert" href="http://chrisrebert.com">
|
||||
<link rel="help" href="https://html.spec.whatwg.org/multipage/#limiting-user-input-length:-the-maxlength-attribute">
|
||||
<meta name="flags" content="interact">
|
||||
<meta name="assert" content="Per the 'Constraint validation' definition in the referenced section, an input whose value was edited by the user but still exceeds the input's maxlength should suffer from being too long.">
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<p>Delete one character from the following text input:</p>
|
||||
<input type="text" value="0123456789" maxlength="5" autocomplete="off" id="testinput">
|
||||
|
||||
<div id="log"></div>
|
||||
<script>
|
||||
var input = document.getElementById('testinput');
|
||||
setup({explicit_timeout: true, explicit_done: true});
|
||||
on_event(input, "input", function () {
|
||||
test(function() {
|
||||
assert_class_string(input.validity, 'ValidityState', 'HTMLInputElement.validity must be a ValidityState instance');
|
||||
assert_true(input.validity.tooLong, "tooLong must be true since the user just changed the input's value and the value exceeds the maxlength");
|
||||
});
|
||||
done();
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
|
@ -181,7 +181,7 @@ test(function() {
|
|||
|
||||
test(function() {
|
||||
textarea.setSelectionRange("string",1);
|
||||
assert_equals(textarea.selectionStart, 1, "element.selectionStart should be 0");
|
||||
assert_equals(textarea.selectionStart, 0, "element.selectionStart should be 0");
|
||||
assert_equals(textarea.selectionEnd, 1, "element.selectionStart should be 1");
|
||||
},'textarea setSelectionRange("string",1)');
|
||||
|
||||
|
@ -193,31 +193,31 @@ test(function() {
|
|||
|
||||
test(function() {
|
||||
textarea.setSelectionRange([],1);
|
||||
assert_equals(textarea.selectionStart, 1, "element.selectionStart should be 0");
|
||||
assert_equals(textarea.selectionStart, 0, "element.selectionStart should be 0");
|
||||
assert_equals(textarea.selectionEnd, 1, "element.selectionStart should be 1");
|
||||
},'textarea setSelectionRange([],1)');
|
||||
|
||||
test(function() {
|
||||
textarea.setSelectionRange({},1);
|
||||
assert_equals(textarea.selectionStart, 1, "element.selectionStart should be 0");
|
||||
assert_equals(textarea.selectionStart, 0, "element.selectionStart should be 0");
|
||||
assert_equals(textarea.selectionEnd, 1, "element.selectionStart should be 1");
|
||||
},'textarea setSelectionRange({},1)');
|
||||
|
||||
test(function() {
|
||||
textarea.setSelectionRange(NaN,1);
|
||||
assert_equals(textarea.selectionStart, 1, "element.selectionStart should be 0");
|
||||
assert_equals(textarea.selectionStart, 0, "element.selectionStart should be 0");
|
||||
assert_equals(textarea.selectionEnd, 1, "element.selectionStart should be 1");
|
||||
},'textarea setSelectionRange(NaN,1)');
|
||||
|
||||
test(function() {
|
||||
textarea.setSelectionRange(null,1);
|
||||
assert_equals(textarea.selectionStart, 1, "element.selectionStart should be 0");
|
||||
assert_equals(textarea.selectionStart, 0, "element.selectionStart should be 0");
|
||||
assert_equals(textarea.selectionEnd, 1, "element.selectionStart should be 1");
|
||||
},'textarea setSelectionRange(null,1)');
|
||||
|
||||
test(function() {
|
||||
textarea.setSelectionRange(undefined,1);
|
||||
assert_equals(textarea.selectionStart, 1, "element.selectionStart should be 0");
|
||||
assert_equals(textarea.selectionStart, 0, "element.selectionStart should be 0");
|
||||
assert_equals(textarea.selectionEnd, 1, "element.selectionStart should be 1");
|
||||
},'textarea setSelectionRange(undefined,1)');
|
||||
},"test of textarea.setSelectionRange");
|
||||
|
|
|
@ -7,10 +7,10 @@
|
|||
<div id="log"></div>
|
||||
<script>
|
||||
test(function() {
|
||||
var valid = ["text", "search", "url", "tel", "email", "password"];
|
||||
var valid = ["text", "search", "url", "tel", "password"];
|
||||
var invalid = ["hidden", "datetime", "date", "month", "week", "datetime-local",
|
||||
"number", "range", "color", "checkbox", "radio", "button",
|
||||
"file", "submit", "image", "reset"];
|
||||
"file", "email", "submit", "image", "reset"];
|
||||
valid.forEach(function(aType) {
|
||||
test(function() {
|
||||
var input = document.createElement("input");
|
||||
|
|
|
@ -0,0 +1,35 @@
|
|||
<!DOCTYPE html>
|
||||
<meta charset="utf-8">
|
||||
<title>HTMLOptGroupElement Test: disabled</title>
|
||||
<meta name="flags" content="interact">
|
||||
<link rel="author" title="Intel" href="http://www.intel.com/">
|
||||
|
||||
<form>
|
||||
<select>
|
||||
<optgroup label="8.01" disabled>
|
||||
<option value="8.01.1">Lecture 01: Powers of Ten</option>
|
||||
<option value="8.01.2">Lecture 02: 1D Kinematics</option>
|
||||
<option value="8.01.3">Lecture 03: Vectors</option>
|
||||
</optgroup>
|
||||
<optgroup label="8.02">
|
||||
<option value="8.02.1">Lecture 01: What holds our world together?</option>
|
||||
<option value="8.02.2">Lecture 02: Electric Field</option>
|
||||
<option value="8.02.3">Lecture 03: Electric Flux</option>
|
||||
</optgroup>
|
||||
</select>
|
||||
</form>
|
||||
|
||||
<h2>Description</h2>
|
||||
<p>
|
||||
This test validates that an optgroup element is disabled if its disabled attribute is present.
|
||||
</p>
|
||||
|
||||
<h2>Test steps:</h2>
|
||||
<ol>
|
||||
<li>
|
||||
Click the select flag to select section '8.01'
|
||||
</li>
|
||||
</ol>
|
||||
|
||||
<h2>Result:</h2>
|
||||
<p>Click the select flag and try to select section 8.01, test passes if the section 8.01 is disable to be selected</p>
|
|
@ -3,8 +3,8 @@
|
|||
<head>
|
||||
<title>HTML Templates: Template element as a descendant of the frameset element.</title>
|
||||
<meta name="author" title="Aleksei Yu. Semenov" href="mailto:a.semenov@unipro.ru">
|
||||
<meta name="assert" content="Template element can be a descendant of the frameset element">
|
||||
<link rel="help" href="http://www.w3.org/TR/2013/WD-html-templates-20130214/#template-element">
|
||||
<meta name="assert" content="Template element can not be a descendant of the frameset element">
|
||||
<link rel="help" href="https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-inframeset">
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src='/html/resources/common.js'></script>
|
||||
|
@ -19,8 +19,8 @@ testInIFrame('../resources/template-descendant-frameset.html', function(context)
|
|||
|
||||
var frameset = doc.querySelector('frameset');
|
||||
|
||||
assert_not_equals(frameset.querySelector('template'), null,
|
||||
'Template element should be a descendant of the frameset element');
|
||||
assert_equals(frameset.querySelector('template'), null,
|
||||
'Template element should not be a descendant of the frameset element');
|
||||
|
||||
}, 'Template element as a descendant of the frameset element. Test loading from a file');
|
||||
|
||||
|
@ -36,8 +36,8 @@ testInIFrame('../resources/template-descendant-frameset.html', function(context)
|
|||
|
||||
frameset.innerHTML = '<template>some text</template>';
|
||||
|
||||
assert_not_equals(frameset.querySelector('template'), null,
|
||||
'Template element should be a descendant of the frameset element');
|
||||
assert_equals(frameset.querySelector('template'), null,
|
||||
'Template element should not be a descendant of the frameset element');
|
||||
|
||||
}, 'Template element as a descendant of the frameset element. '
|
||||
+ 'Test template element is assigned to frameset\'s innerHTML)');
|
||||
|
@ -51,7 +51,7 @@ testInIFrame('../resources/template-descendant-frameset.html', function(context)
|
|||
var template = doc.createElement('template');
|
||||
frameset.appendChild(template);
|
||||
|
||||
assert_equals(frameset.querySelectorAll('template').length, 2,
|
||||
assert_equals(frameset.querySelectorAll('template').length, 1,
|
||||
'Template element should be a descendant of the frameset element');
|
||||
|
||||
}, 'Template element as a descendant of the frameset element. '
|
||||
|
|
|
@ -2,9 +2,8 @@
|
|||
<meta charset=utf-8>
|
||||
<title>The wbr element</title>
|
||||
<link rel="author" title="Denis Ah-Kang" href="mailto:denis@w3.org">
|
||||
<link rel="mismatch" href="wbr-element-notref.html" />
|
||||
<meta name="flags" content="ahem">
|
||||
<style>
|
||||
p {font-family: Ahem;}
|
||||
p {font:15px/1 Ahem;}
|
||||
</style>
|
||||
<p>Loremipsumdolorsit<br>amet,consectetur<br>adipisicingelit,sed<br>doeiusmodtempor<br>incididuntutlaboreet<br>doloremagnaaliqua.Ut<br>enimadminimveniam,<br>quisnostrud<br>exercitationullamco<br>laborisnisiutaliquip<br>exeacommodo<br>consequat.Duisaute<br>iruredolorin<br>reprehenderitin<br>voluptatevelitesse<br>cillumdoloreeufugiat<br>nullapariatur.<br>Excepteursint<br>occaecatcupidatatnon<br>proident,suntinculpa<br>quiofficiadeserunt<br>mollitanimidest<br>laborum.</p>
|
||||
|
|
|
@ -6,6 +6,6 @@
|
|||
<link rel="match" href="wbr-element-ref.html">
|
||||
<meta name="flags" content="ahem">
|
||||
<style>
|
||||
p {max-width: 300px; font-family: Ahem;}
|
||||
p {max-width: 300px; font:15px/1 Ahem;}
|
||||
</style>
|
||||
<p>AHEM_<wbr>ipsum<wbr>dolor<wbr>sit<wbr>amet,<wbr>consectetur<wbr>adipisicing<wbr>elit,<wbr>sed<wbr>do<wbr>eiusmod<wbr>tempor<wbr>incididunt<wbr>ut<wbr>labore<wbr>et<wbr>dolore<wbr>magna<wbr>aliqua.<wbr>Ut<wbr>enim<wbr>ad<wbr>minim<wbr>veniam,<wbr>quis<wbr>nostrud<wbr>exercitation<wbr>ullamco<wbr>laboris<wbr>nisi<wbr>ut<wbr>aliquip<wbr>ex<wbr>ea<wbr>commodo<wbr>consequat.<wbr>Duis<wbr>aute<wbr>irure<wbr>dolor<wbr>in<wbr>reprehenderit<wbr>in<wbr>voluptate<wbr>velit<wbr>esse<wbr>cillum<wbr>dolore<wbr>eu<wbr>fugiat<wbr>nulla<wbr>pariatur.<wbr>Excepteur<wbr>sint<wbr>occaecat<wbr>cupidatat<wbr>non<wbr>proident,<wbr>sunt<wbr>in<wbr>culpa<wbr>qui<wbr>officia<wbr>deserunt<wbr>mollit<wbr>anim<wbr>id<wbr>est<wbr>laborum.</p>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue