tizen beta release
[profile/ivi/webkit-efl.git] / LayoutTests / platform / win / accessibility / single-select-children-changed.html
1 <html>
2 <head>
3     <script src="../../../fast/js/resources/js-test-pre.js"></script>
4 </head>
5
6 <body id="body">
7
8 <select id="selectElement" title="selectElement">
9     <option SELECTED>Option 1</option>
10 </select>
11
12 <p>This tests that non-multiple select elements expose their updated children if they change.</p>
13
14 <p id="notDRT">This test should only be run inside of DumpRenderTree.</p>
15
16 <p id="console"></p>
17
18 <script>
19     if (window.layoutTestController && window.accessibilityController) {
20         document.getElementById("notDRT").style.visibility = "hidden";
21
22         layoutTestController.dumpAsText();
23
24         document.getElementById("selectElement").focus();
25         var selectElement = accessibilityController.focusedElement;
26         var list = accessibilityController.focusedElement.childAtIndex(0);
27
28         var option = list.childAtIndex(0);
29         shouldBeTrue('option.title === "Option 1"');
30
31         var newOption = document.createElement("option");
32         newOption.innerHTML = "Option 2";
33         document.getElementById("selectElement").appendChild(newOption);
34
35         var option2 = list.childAtIndex(1);
36         shouldBeTrue('option2.title === "Option 2"');
37     }
38 </script>
39 </body>
40 </html>