gecko/layout/reftests/css-invalid/input/input-dyn-not-disabled.html

23 lines
626 B
HTML

<!DOCTYPE html>
<html class="reftest-wait">
<!-- Test: if input is not disabled and invalid, it is candidate for
constraint validation and should be affected
by :invalid pseudo-class. -->
<style>
input { background-color: red; }
input:invalid { background-color: green; }
</style>
<script>
function onLoadHandler()
{
var e = document.getElementById('i');
e.setCustomValidity('foo');
e.removeAttribute('disabled');
document.documentElement.className='';
}
</script>
<body onload="onLoadHandler();">
<input id='i' disabled>
</body>
</html>