Update web-platform-tests to revision 44702f2bc8ea98bc32b5b244f2fe63c6ce66d49d

This commit is contained in:
Josh Matthews 2017-11-15 12:15:13 -05:00
parent 85fa6409bb
commit c227604a2c
997 changed files with 45660 additions and 14650 deletions

View file

@ -112,7 +112,7 @@
//
// This is unfortunately racy in that we might _still_ get spurious
// passes. I'm not sure how best to handle that.
setTimeout(this.step_func(function() {
this.step_timeout(function() {
var q = false;
element.onselect = this.step_func_done(function(e) {
assert_true(q, "event should be queued");
@ -122,7 +122,7 @@
});
element.setRangeText("foobar2", 0, 6);
q = true;
}), 10);
}, 10);
}, element.id + " setRangeText fires a select event");
})

View file

@ -102,7 +102,7 @@
*/
assert_true(checkbox5.checked);
assert_false(checkbox5.indeterminate);
window.setTimeout(t5.step_func(function(e) {
t5.step_timeout(function() {
/*
The click event has finished being dispatched, so the checkedness and
determinateness have been toggled back by now because the event
@ -111,7 +111,7 @@
assert_false(checkbox5.checked);
assert_false(checkbox5.indeterminate);
t5.done();
}), 0);
}, 0);
});
t5.step(function(){
@ -129,7 +129,7 @@
*/
assert_true(checkbox6.checked);
assert_true(checkbox6.indeterminate);
window.setTimeout(t6.step_func(function(e) {
t6.step_timeout(function() {
/*
The click event has finished being dispatched, so the checkedness and
determinateness have been toggled back by now because the event
@ -138,7 +138,7 @@
assert_false(checkbox6.checked);
assert_false(checkbox6.indeterminate);
t6.done();
}), 0);
}, 0);
});
t6.step(function(){

View file

@ -0,0 +1,24 @@
<!doctype html>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<form>
<select>
<option value='foo'>bar</option>
</select>
</form>
<script>
test(() => {
var option = document.querySelector('option');
var textChild = option.firstChild;
assert_equals(textChild.nodeValue, "bar", "Verify that text child node's value equals the option value.");
assert_true(textChild.isConnected, 'Verify that text child node is in the document.');
option.text = "baz";
assert_equals(textChild.nodeValue, "bar", 'Verify that the text child node does not have an updated value.');
assert_false(textChild.isConnected, 'Verify that the text child node is not in the document.');
assert_false(textChild == option.firstChild, 'Verify that text child node was replaced by a different text child node.');
assert_equals(option.firstChild.nodeValue, "baz", 'Verify that the new text child node does equal the updated value.');
assert_equals(option.text, "baz", 'Verify that option text getter returns the updated value.');
option.text = "";
assert_true(option.firstChild == null, 'Verify that after setting to empty string there are no child text nodes.');
}, 'Verify that using HTMLOptionElement.text setter does not update the existing text child node.');
</script>