| <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> |
| <html> |
| <head> |
| <script src="../../resources/js-test-pre.js"></script> |
| <script> |
| var successfullyParsed = false; |
| </script> |
| </head> |
| <body id="body"> |
| |
| <div id="container" role="group"> |
| |
| <img src="resources/cake.png" usemap="#map" id="backImg" alt="" width="225" height="206"> |
| |
| <map id="link" name="map" aria-labelledby="papercolor"> |
| <area shape="rect" tabindex="0" alt="yellow" href="#" coords="19,28,46,52" id="yellow"> |
| <area shape="rect" tabindex="0" alt="orange" href="#" coords="58,28,85,52" id="orange"> |
| </map> |
| </div> |
| |
| <p id="description"></p> |
| <div id="console"></div> |
| |
| <script> |
| |
| description("This makes sure that we don't crash when asking for the parent element of an object that has no document() because its parent was detached"); |
| |
| if (window.accessibilityController) { |
| |
| var link = accessibilityController.accessibleElementById("container").childAtIndex(0); |
| shouldBe("link.description", "'AXLabel: yellow'"); |
| |
| document.getElementById("backImg").parentNode.removeChild(document.getElementById("backImg")); |
| |
| // Should not crash here when asking for parentElement (even though it was removed). |
| shouldBeTrue("link.parentElement() == null || link.parentElement().isValid"); |
| } |
| |
| successfullyParsed = true; |
| </script> |
| |
| <script src="../../resources/js-test-post.js"></script> |
| </body> |
| </html> |
| |