Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / forms / onchange-enter-submit.html
blob98fb02f915af167e264735f48a27acbd2fea76aa
1 <html>
2 <head>
3 <script>
4 function log(msg) {
5 var res = document.getElementById('res');
6 res.innerHTML = res.innerHTML + msg + "<br>";
9 function test() {
10 var tf = document.getElementById('tf');
12 if (window.testRunner) {
13 testRunner.dumpAsText();
16 tf.focus();
17 if (window.testRunner) {
18 eventSender.keyDown('a');
19 eventSender.keyDown('\r');
23 </script>
24 </head>
25 <body onload="test()">
26 This tests that onchange fires when you press Enter to submit a form.<br>
27 <form name="fm" onsubmit="log('on submit'); return false;">
28 <input type="text" id="tf" onchange="log('text onchange')" onblur="log('text onblur')"></input>
29 </form>
30 <div id="res"></div>
31 </body>
32 </html>