4 <p>This test ensures change event is fired for input[type=number] when the user reverts the change made by a script.
</p>
5 <div id=
"console"></div>
6 <div><input id=
"test" type=
"number" onchange=
"numberOfChangeEventsFired++;"><input id=
"dummy"></div>
7 <script src=
"../../../resources/js-test.js"></script>
10 if (window
.testRunner
)
11 testRunner
.dumpAsText();
13 var numberOfChangeEventsFired
= 0;
14 var test
= document
.getElementById('test');
15 var dummy
= document
.getElementById('dummy');
18 if (window
.eventSender
) {
19 shouldBe("eventSender.keyDown('1');eventSender.keyDown('2');dummy.focus();numberOfChangeEventsFired", '1');
20 shouldBe("test.value = '34';numberOfChangeEventsFired", '1');
21 shouldBe("test.focus();test.value = '34';document.execCommand('SelectAll');\n"
22 + "eventSender.keyDown('1');eventSender.keyDown('2');dummy.focus();numberOfChangeEventsFired", '2');
23 test
.parentNode
.style
.display
= 'none';