Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(24)

Side by Side Diff: third_party/WebKit/LayoutTests/accessibility/insert-adjacent-html-causes-crash.xhtml

Issue 2295653002: Use window.testRunner in if-clause (Closed)
Patch Set: a Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/compositing/squashing/dont-squash-into-iframes.html » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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>
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/compositing/squashing/dont-squash-into-iframes.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698