3 <script src="../../../fast/js/resources/js-test-pre.js"></script>
8 <select id="selectElement" title="selectElement">
9 <option SELECTED>Option 1</option>
12 <p>This tests that non-multiple select elements expose their updated children if they change.</p>
14 <p id="notDRT">This test should only be run inside of DumpRenderTree.</p>
19 if (window.layoutTestController && window.accessibilityController) {
20 document.getElementById("notDRT").style.visibility = "hidden";
22 layoutTestController.dumpAsText();
24 document.getElementById("selectElement").focus();
25 var selectElement = accessibilityController.focusedElement;
26 var list = accessibilityController.focusedElement.childAtIndex(0);
28 var option = list.childAtIndex(0);
29 shouldBeTrue('option.title === "Option 1"');
31 var newOption = document.createElement("option");
32 newOption.innerHTML = "Option 2";
33 document.getElementById("selectElement").appendChild(newOption);
35 var option2 = list.childAtIndex(1);
36 shouldBeTrue('option2.title === "Option 2"');