Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / forms / select / popup-closes-on-blur.html
blob1e788ed1189d98cd5cc9a4033163d28d774647d8
1 <html>
2 <head>
3 <title></title>
4 <script src="../../../resources/js-test.js"></script>
5 </head>
6 <body>
7 <p id="description"></p>
8 <div id="console"></div>
9 <select name="switcher" id="switcher">
10 <option value="one">One</option>
11 <option value="two">Two</option>
12 </select>
13 <input id="text"></input>
15 <script>
16 function test()
18 if (!window.testRunner || !window.internals)
19 return;
21 testRunner.dumpAsText();
23 description('Test for <i><a href="http://bugs.webkit.org/show_bug.cgi?id=113220">http://bugs.webkit.org/show_bug.cgi?id=113220</a>: ensures select popup closes when focus changes</i>.');
25 popup = document.getElementById("switcher");
26 popup.focus();
28 eventSender.keyDown(" ", null);
30 shouldBeTrue("internals.isSelectPopupVisible(popup)");
32 var text = document.getElementById("text");
33 text.focus();
35 shouldBeFalse("internals.isSelectPopupVisible(popup)");
37 test();
38 </script>
39 </body>
40 </html>