Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(851)

Side by Side Diff: third_party/WebKit/LayoutTests/fast/forms/select-double-onchange.html

Issue 1509853008: Move select/option/optgroup-related tests in fast/forms to fast/forms/select. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(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>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698