Home | History | Annotate | Download | only in assets
      1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> 
      2 <html> 
      3 <head>
      4 <script> 
      5 
      6     function buildAccessibilityTree(accessibilityObject, indent) {
      7         var str = "";
      8         for (var i = 0; i < indent; i++)
      9             str += "    ";
     10         str += accessibilityObject.role;
     11         str += " " + accessibilityObject.stringValue;
     12         str += "\n";
     13         document.getElementById("tree").innerText += str;
     14 
     15         if (accessibilityObject.stringValue.indexOf('End of test') >= 0)
     16             return false;
     17 
     18         var count = accessibilityObject.childrenCount;
     19         for (var i = 0; i < count; ++i) {
     20             if (!buildAccessibilityTree(accessibilityObject.childAtIndex(i), indent + 1))
     21                 return false;
     22         }
     23 
     24         return true;
     25     }
     26 </script> 
     27 <script src="../fast/js/resources/js-test-pre.js"></script> 
     28 </head> 
     29 <body> 
     30  
     31 <a><div></div></a>
     32 
     33 <a><div></div></a>
     34 
     35 <a href="about:blank"><div></div></a> 
     36 
     37 <div>End of test</div>
     38 
     39 <pre id="tree"></pre>
     40  
     41 <p id="description"></p> 
     42 <div id="console"></div> 
     43  
     44 <script> 
     45     description("This can cause a crash.");
     46  
     47     if (window.accessibilityController) {
     48         // First build up full accessibility tree.
     49         document.getElementById("tree").innerText += "Before:\n";
     50         document.body.focus();
     51         buildAccessibilityTree(accessibilityController.focusedElement, 0);
     52         
     53         // Remove anchor that causes debug assert in AccessibilityRenderObject::addChildren
     54         document.body.removeChild(document.body.children[2])
     55         
     56         // Build up full accessibility tree again.
     57         document.getElementById("tree").innerText += "After:\n";
     58         document.body.focus();
     59         buildAccessibilityTree(accessibilityController.focusedElement, 0);
     60     }
     61  
     62 </script> 
     63  
     64 <script src="../fast/js/resources/js-test-post.js"></script> 
     65 </body> 
     66 </html> 
     67