Geremy Condra | c957189 | 2012-03-05 12:32:24 -0800 | [diff] [blame] | 1 | <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
|
| 2 | <html>
|
| 3 | <head>
|
| 4 | <script>
|
| 5 |
|
| 6 | function removeAreaElement() {
|
| 7 | document.getElementById("test").innerHTML=1
|
| 8 | }
|
| 9 |
|
| 10 | function queryTitleOnDecendants(accessibilityObject) {
|
| 11 | accessibilityObject.title
|
| 12 |
|
| 13 | var count = accessibilityObject.childrenCount;
|
| 14 | for (var i = 0; i < count; ++i)
|
| 15 | queryTitleOnDecendants(accessibilityObject.childAtIndex(i));
|
| 16 | }
|
| 17 | </script>
|
| 18 | <script src="../fast/js/resources/js-test-pre.js"></script>
|
| 19 | </head>
|
| 20 | <body>
|
| 21 |
|
| 22 | <img usemap="#map">
|
| 23 | <map name="map" id="test"><area href="javascript:document.getElementById('result').innerHTML='area clicked'" /></map>
|
| 24 |
|
| 25 | <p id="description"></p>
|
| 26 | <div id="console"></div>
|
| 27 |
|
| 28 | <script>
|
| 29 | description("Requesting the title of an AccessibilityImageMapLink can cause a crash when the map's area element has been removed.");
|
| 30 |
|
| 31 | if (window.accessibilityController) {
|
| 32 | // First build up full accessibility tree.
|
| 33 | document.body.focus();
|
| 34 | queryTitleOnDecendants(accessibilityController.focusedElement);
|
| 35 |
|
| 36 | removeAreaElement()
|
| 37 |
|
| 38 | // Now call request the title for each accessibility object.
|
| 39 | document.body.focus();
|
| 40 | queryTitleOnDecendants(accessibilityController.focusedElement);
|
| 41 | }
|
| 42 |
|
| 43 | </script>
|
| 44 |
|
| 45 | <script src="../fast/js/resources/js-test-post.js"></script>
|
| 46 | </body>
|
| 47 | </html>
|