Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / accessibility / image-map-title-causes-crash.html
blob7eb404fb9ed4279c45af91b1b7ed5cf4a17e1681
1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
2 <html>
3 <head>
4 <script>
6 function removeAreaElement() {
7 document.getElementById("test").innerHTML=1
10 function queryTitleOnDecendants(accessibilityObject) {
11 accessibilityObject.deprecatedTitle
13 var count = accessibilityObject.childrenCount;
14 for (var i = 0; i < count; ++i)
15 queryTitleOnDecendants(accessibilityObject.childAtIndex(i));
17 </script>
18 <script src="../resources/js-test.js"></script>
19 </head>
20 <body>
22 <img usemap="#map">
23 <map name="map" id="test"><area href="javascript:document.getElementById('result').innerHTML='area clicked'" /></map>
25 <p id="description"></p>
26 <div id="console"></div>
28 <script>
29 description("Requesting the title of an AccessibilityImageMapLink can cause a crash when the map's area element has been removed.");
31 if (window.accessibilityController) {
32 // First build up full accessibility tree.
33 document.body.focus();
34 queryTitleOnDecendants(accessibilityController.focusedElement);
36 removeAreaElement()
38 // Now call request the title for each accessibility object.
39 document.body.focus();
40 queryTitleOnDecendants(accessibilityController.focusedElement);
43 </script>
45 </body>
46 </html>