blob: cd0a737c664179ffdb595733157c434cde8c5464 [file] [log] [blame]
<!DOCTYPE html>
<script src="../../resources/testharness.js"></script>
<script src="../../resources/testharnessreport.js"></script>
<select required></select>
<script>
var t = async_test('Ensure that adding an OPTION to a SELECT element closes a validation bubble.');
var select = document.querySelector('select');
t.step(() => {
assert_own_property(window, 'internals');
select.reportValidity();
assert_true(internals.isValidationMessageVisible(select));
select.appendChild(new Option('value'));
t.step_timeout(() => {
assert_false(internals.isValidationMessageVisible(select));
t.done();
}, 100);
});
</script>