4 <script src=
"../../resources/js-test.js"></script>
7 <input id=
"input" type=
"text" onchange=
"changeHandler()">
9 description('This test verifies that the change event is fired, when value is changed in change event handler.');
10 var input
= document
.getElementById('input');
11 var changeEventCounter
= 0;
12 function changeHandler()
19 document
.execCommand('InsertText', false, 'foo bar baz');
20 shouldBeEqualToString('input.value', 'foo bar baz');
22 shouldBe('changeEventCounter', '1');
23 shouldBeEqualToString('input.value', '');
26 document
.execCommand('InsertText', false, 'foo bar baz');
27 shouldBeEqualToString('input.value', 'foo bar baz');
29 shouldBe('changeEventCounter', '2');