Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / forms / select / listbox-oninput-fired.html
blob1db8b488597efe71ac07566ab9a4b4f980774d71
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 selectInputDispatched() {
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 down arrow key");
24 eventSender.keyDown('downArrow');
26 debug("Pressing up arrow key");
27 eventSender.keyDown('upArrow');
29 debug("Pressing page down key");
30 eventSender.keyDown('pageDown');
32 debug("Pressing page up key");
33 eventSender.keyDown('pageUp');
35 debug("Pressing end key");
36 eventSender.keyDown('end');
38 finishTest = true;
40 debug("Pressing home key");
41 eventSender.keyDown('home');
42 } else {
43 debug("Test manually by pressing up/down key. Should get PASS message");
44 finishJSTest();
48 successfullyParsed = true;
49 </script>
50 </head>
51 <body onload="test()">
52 <p>Selecting listbox options should fire oninput event</p>
54 <select id="bug-test" onInput="selectInputDispatched()" multiple="multiple">
55 <option>option 1</option>
56 <option>option 2</option>
57 <option>option 3</option>
58 <option>option 4</option>
59 </select>
61 <div id="console"></div>
62 </body>
63 </html>