Update web-platform-tests to revision 5a754b40cd49c0404863c431b58cc311dc5d167c

This commit is contained in:
Ms2ger 2015-11-17 09:56:30 +01:00
parent 8950345e0e
commit 32efe41299
107 changed files with 4243 additions and 435 deletions

View file

@ -285,30 +285,10 @@ var validator = {
},
set_dirty: function(ctl) {
document.designMode = "on";
ctl.focus();
var old_value = ctl.value;
ctl.value = "a";
ctl.value = old_value;
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.designMode = "off";
},
pre_check: function(ctl, item) {

View file

@ -5,6 +5,8 @@
<title id='title'>HTMLOptionsCollection</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
</head>
<body>
<div id="log"></div>
<select id="selly">
<option id="id1" name="name1">1</option>
@ -37,26 +39,16 @@ test(function () {
}, "if no item has a name or id value matching the parameter, return null and stop");
test(function () {
var testarr = [];
for (var i = 0; i < selly.namedItem('id3').length; i++) {
testarr.push(selly.namedItem('id3')[i].text);
}
assert_array_equals(testarr, ['3','duplicate ID']);
}, "return an HTMLOptionsCollection in correct order for repeated 'id' value");
assert_equals(selly.namedItem('id3')["value"], "3");
}, "if multiple items have a name or *id* value matching the parameter, return the first object and stop");
test(function () {
var testarr = [];
for (var i = 0; i < selly.namedItem('name4').length; i++) {
testarr.push(selly.namedItem('name4')[i].text);
}
assert_array_equals(testarr, ['4', 'duplicate name']);
}, "return an HTMLOptionsCollection in correct order for repeated 'name' value");
assert_equals(selly.namedItem('name4')["value"], "4");
}, "if multiple items have a *name* or id value matching the parameter, return the first object and stop");
test(function () {
var testarr = [];
for (var i = 0; i < selly.namedItem('mixed1').length; i++) {
testarr.push(selly.namedItem('mixed1')[i].text);
}
assert_array_equals(testarr, ['mixed ID', 'mixed name']);
}, "return an HTMLOptionsCollection in correct order for repeated mixed value");
assert_equals(selly.namedItem('mixed1')["value"], "mixed ID");
}, "if multiple items have a *name* or *id* value matching the parameter, return the first object and stop");
</script>
</body>
</html>