blob: 0ae9e9d196a87753026662076063162afa04ceab [file] [log] [blame]
Tests &lt;select&gt; text update when popup is visible and selectionIndex changes.<br>
Needs run-layout-test.<br>
<div style="position: absolute; top: 50px">
<select id="select">
<option>A</option>
<option>B</option>
<option>C</option>
</select>
</div>
<pre id="output"></pre>
<script>
if (window.testRunner && window.eventSender) {
testRunner.dumpAsText();
var select = document.getElementById('select');
select.focus();
eventSender.keyDown(' ', null);
select.selectedIndex = 2;
// We need to show in the result the title text of the select when popup is visible.
// Must dump renderer tree here otherwise run-layout-test will close the popup.
// The title text should be "C".
output.textContent = internals.elementLayoutTreeAsText(select.parentNode);
testRunner.notifyDone();
}
</script>