| OLD | NEW |
| (Empty) |
| 1 <html> | |
| 2 <head> | |
| 3 <script src="../../../fast/js/resources/js-test-pre.js"></script> | |
| 4 </head> | |
| 5 <body> | |
| 6 | |
| 7 <script> | |
| 8 if (window.testRunner) | |
| 9 testRunner.dumpAsText(); | |
| 10 </script> | |
| 11 | |
| 12 <p id="description">This test makes sure that adding a selected option to a menu
list via an unusual route (document.write from an external script) doesn't trig
ger a crash when didUpdateActiveOption is called before the children are updated
.</p> | |
| 13 <div id="console"></div> | |
| 14 | |
| 15 <select id="menulist"> | |
| 16 <option>1</option> | |
| 17 <script> | |
| 18 window.menulist = document.getElementById("menulist"); | |
| 19 menulist.focus(); | |
| 20 if (window.testRunner && window.accessibilityController) { | |
| 21 window.accessibleMenulist = accessibilityController.focusedElement; | |
| 22 shouldBe("accessibleMenulist.childAtIndex(0).childrenCount", "1"); | |
| 23 } | |
| 24 </script> | |
| 25 <script src="data:text/javascript,document.write('<option selected>2');"></s
cript> | |
| 26 <script> | |
| 27 if (window.testRunner && window.accessibilityController) | |
| 28 shouldBe("accessibleMenulist.childAtIndex(0).childrenCount", "2"); | |
| 29 </script> | |
| 30 <script> | |
| 31 menulist.removeChild(menulist.selectedOptions[0]); | |
| 32 if (window.testRunner && window.accessibilityController) | |
| 33 shouldBe("accessibleMenulist.childAtIndex(0).childrenCount", "1"); | |
| 34 </script> | |
| 35 </select> | |
| 36 | |
| 37 <script src="../../../fast/js/resources/js-test-post.js"></script> | |
| 38 | |
| 39 </body> | |
| 40 </html> | |
| OLD | NEW |