Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / forms / select / menulist-update-text-popup.html
blob0ae9e9d196a87753026662076063162afa04ceab
1 Tests &lt;select&gt; text update when popup is visible and selectionIndex changes.<br>
2 Needs run-layout-test.<br>
3 <div style="position: absolute; top: 50px">
4 <select id="select">
5 <option>A</option>
6 <option>B</option>
7 <option>C</option>
8 </select>
9 </div>
10 <pre id="output"></pre>
11 <script>
12 if (window.testRunner && window.eventSender) {
13 testRunner.dumpAsText();
14 var select = document.getElementById('select');
15 select.focus();
16 eventSender.keyDown(' ', null);
17 select.selectedIndex = 2;
19 // We need to show in the result the title text of the select when popup is visible.
20 // Must dump renderer tree here otherwise run-layout-test will close the popup.
21 // The title text should be "C".
22 output.textContent = internals.elementLayoutTreeAsText(select.parentNode);
23 testRunner.notifyDone();
25 </script>