3 <script src=
"../../resources/js-test.js"></script>
6 var tf
= document
.getElementById('tf');
8 var didFireOnChange
= false;
9 tf
.onchange = function() {
10 didFireOnChange
= true;
13 if (window
.testRunner
) {
14 testRunner
.dumpAsText();
18 if (window
.internals
) {
19 internals
.setValueForUser(tf
, 'Hello!');
22 // Should not fire the event until focus is lost.
23 if (didFireOnChange
) {
24 testFailed('onchange fired too early');
29 if (didFireOnChange
) {
32 testFailed('onchange never fired')
37 <body onload=
"test()">
38 This tests that onchange correctly fires after calling setValueForUser(). It can only be run using DumpRenderTree.
<br>
40 <input type=
"text" id=
"tf" />
42 <div id=
"console"></div>