Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / forms / select-double-onchange.html
blob1051b9272e85c4004ebd426c9716a5948c707f85
1 <html>
2 <head>
3 <title></title>
4 <script type="text/javascript">
5 var onchangeCount = 0;
7 function test()
9 if (!window.eventSender)
10 return;
12 testRunner.dumpAsText();
14 var popup = document.getElementById("switcher");
15 popup.focus();
17 eventSender.keyDown("t", null);
18 eventSender.keyDown("\r", null);
21 function changed(select)
23 select.blur();
24 onchangeCount++;
26 var result = document.getElementById("result");
27 result.innerText = onchangeCount == 1 ? "SUCCESS" : "FAILURE: onchange count was " + onchangeCount;
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">http://bugs.webkit.org/show_bug.cgi?id=13857</a>
34 REGRESSION: onChange function applied to select element executes twice when focus is set</i>.
35 </p>
36 <p id="result">
37 To test interactively, select the other option in the pop up. This text 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>