| OLD | NEW |
| (Empty) |
| 1 <html> | |
| 2 <head> | |
| 3 <title></title> | |
| 4 <script type="text/javascript"> | |
| 5 var onchangeCount = 0; | |
| 6 | |
| 7 function test() | |
| 8 { | |
| 9 if (!window.eventSender) | |
| 10 return; | |
| 11 | |
| 12 testRunner.dumpAsText(); | |
| 13 | |
| 14 var popup = document.getElementById("switcher"); | |
| 15 popup.focus(); | |
| 16 | |
| 17 eventSender.keyDown("t", null); | |
| 18 eventSender.keyDown("\r", null); | |
| 19 } | |
| 20 | |
| 21 function changed(select) | |
| 22 { | |
| 23 select.blur(); | |
| 24 onchangeCount++; | |
| 25 | |
| 26 var result = document.getElementById("result"); | |
| 27 result.innerText = onchangeCount == 1 ? "SUCCESS" : "FAILURE: on
change count was " + onchangeCount; | |
| 28 } | |
| 29 </script> | |
| 30 </head> | |
| 31 <body onload="test()"> | |
| 32 <p> | |
| 33 Test for <i><a href="http://bugs.webkit.org/show_bug.cgi?id=13857">h
ttp://bugs.webkit.org/show_bug.cgi?id=13857</a> | |
| 34 REGRESSION: onChange function applied to select element executes twi
ce when focus is set</i>. | |
| 35 </p> | |
| 36 <p id="result"> | |
| 37 To test interactively, select the other option in the pop up. This t
ext should change to SUCCESS. | |
| 38 </p> | |
| 39 <select name="switcher" id="switcher" onchange="changed(this)"> | |
| 40 <option value="one">One</option> | |
| 41 <option value="two">Two</option> | |
| 42 </select> | |
| 43 </body> | |
| 44 </html> | |
| OLD | NEW |