Update web-platform-tests to revision cfada7e6cb379699fa94c7ed8fcb97082327e10c

This commit is contained in:
WPT Sync Bot 2019-07-31 10:22:21 +00:00
parent 87e7e3d429
commit 06b00da16b
179 changed files with 6103 additions and 1186 deletions

View file

@ -30,6 +30,11 @@
<option style="display:none"></option>
<option></option>
</select>
<select id=minus-one>
<option value=1>1</option>
<option value=2>2</option>
</select>
</form>
<script>
@ -38,6 +43,10 @@ function assertSelectedIndex(select, value) {
assert_equals(select.options.selectedIndex, value);
}
function assertSelectValue(select, value) {
assert_equals(select.value, value);
}
test(function () {
var select = document.getElementById('empty');
assertSelectedIndex(select, -1);
@ -120,4 +129,15 @@ test(function () {
select.options[1].selected = false;
assertSelectedIndex(select, 0);
}, "reset to display:none");
test(function() {
var select = document.getElementById("minus-one");
assertSelectedIndex(select, 0);
select.selectedIndex = -1;
assertSelectedIndex(select, -1);
assertSelectValue(select, "");
}, "set selectedIndex=-1");
</script>