| OLD | NEW |
| 1 <!-- This document must be xhtml for the crash to occur --> | 1 <!-- This document must be xhtml for the crash to occur --> |
| 2 <li xmlns="http://www.w3.org/1999/xhtml"> | 2 <li xmlns="http://www.w3.org/1999/xhtml"> |
| 3 <h1 id="x">x<h1></h1></h1> | 3 <h1 id="x">x<h1></h1></h1> |
| 4 <script><![CDATA[ | 4 <script><![CDATA[ |
| 5 if (testRunner) | 5 if (window.testRunner) |
| 6 testRunner.dumpAsText(); | 6 testRunner.dumpAsText(); |
| 7 | 7 |
| 8 // Calling accessibleElementById on a nonexistant id has the side effect | 8 // Calling accessibleElementById on a nonexistant id has the side effect |
| 9 // of creating an accessibility object for every node in the tree. | 9 // of creating an accessibility object for every node in the tree. |
| 10 if (accessibilityController) | 10 if (accessibilityController) |
| 11 accessibilityController.accessibleElementById('dummy'); | 11 accessibilityController.accessibleElementById('dummy'); |
| 12 | 12 |
| 13 // Calling insertAdjacentHTML causes the cached parent of an | 13 // Calling insertAdjacentHTML causes the cached parent of an |
| 14 // AXLayoutObject to be invalid after the next layout. | 14 // AXLayoutObject to be invalid after the next layout. |
| 15 x=document.getElementById("x"); | 15 x=document.getElementById("x"); |
| 16 x.insertAdjacentHTML("beforebegin", "text"); | 16 x.insertAdjacentHTML("beforebegin", "text"); |
| 17 | 17 |
| 18 // Force layout. | 18 // Force layout. |
| 19 x.offsetTop; | 19 x.offsetTop; |
| 20 | 20 |
| 21 // Explore the accessibility tree again, triggering the crash if | 21 // Explore the accessibility tree again, triggering the crash if |
| 22 // the cached parent isn't updated correctly. | 22 // the cached parent isn't updated correctly. |
| 23 if (accessibilityController) | 23 if (accessibilityController) |
| 24 accessibilityController.accessibleElementById('dummy'); | 24 accessibilityController.accessibleElementById('dummy'); |
| 25 ]]></script> | 25 ]]></script> |
| 26 </li> | 26 </li> |
| OLD | NEW |