blob: 9e13e916d0564a78386e1d36a252e98e01c8c685 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
<body>
<script src="../../../resources/js-test.js"></script>
<form>
<input value="a" id="input1">
</form>
<script>
description('Date input with invalid initial value should not dispatch a change event on disabled=true, and should not crash.');
var changeEventCounter = 0;
var input1 = document.querySelector('#input1');
input1.type = 'date';
input1.addEventListener('change', function handleChange() {
++changeEventCounter;
input1.removeEventListener('change', handleChange);
input1.type = 'search';
}, false);
input1.disabled = true;
shouldBe('changeEventCounter', '0');
</script>
</body>
</html>
|