Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / forms / select / menulist-onchange-fired-with-key-up-down.html
blobfe10f0d6b110e8ea5c8b7fb0757e165ec394603c
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <meta charset="utf-8">
5 <script src="../../../resources/js-test.js"></script>
6 <script>
7 window.jsTestIsAsync = true;
9 var finishTest = false;
11 function optionChanged() {
12 debug("PASS");
13 if (finishTest)
14 finishJSTest();
17 function test() {
18 document.getElementById("bug-test").focus();
19 if (window.eventSender) {
20 debug("Pressing down arrow key");
21 eventSender.keyDown('downArrow');
23 debug("Pressing up arrow key");
24 eventSender.keyDown('upArrow');
26 debug("Pressing page down key");
27 eventSender.keyDown('pageDown');
29 debug("Pressing page up key");
30 eventSender.keyDown('pageUp');
32 debug("Pressing end key");
33 eventSender.keyDown('end');
35 finishTest = true;
37 debug("Pressing home key");
38 eventSender.keyDown('home');
39 } else {
40 debug("Test manually by pressing up/down key. Should get PASS message");
41 finishJSTest();
45 successfullyParsed = true;
46 </script>
47 </head>
48 <body onload="test()">
49 <p>Selecting menu list options using up/down key should fire onchange event</p>
51 <select id="bug-test" onChange="optionChanged()">
52 <option>option 1</option>
53 <option>option 2</option>
54 <option>option 3</option>
55 <option>option 4</option>
56 </select>
58 <div id="console"></div>
59 </body>
60 </html>