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

Unified Diff: LayoutTests/accessibility/removed-anonymous-block-child-causes-crash.html

Issue 3176001: Merge 65095 - Removing an element from an anonymous block causes crash... (Closed) Base URL: svn://svn.chromium.org/chrome/branches/WebKit/472/
Patch Set: '' Created 10 years, 4 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 side-by-side diff with in-line comments
Download patch
Index: LayoutTests/accessibility/removed-anonymous-block-child-causes-crash.html
===================================================================
--- LayoutTests/accessibility/removed-anonymous-block-child-causes-crash.html (revision 0)
+++ LayoutTests/accessibility/removed-anonymous-block-child-causes-crash.html (revision 55630)
@@ -0,0 +1,55 @@
+<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
+<html>
+<head>
+<link rel="stylesheet" href="../fast/js/resources/js-test-style.css">
+<script>
+ var successfullyParsed = false;
+
+ function removeElement() {
+ document.getElementById('div').removeChild(document.getElementById('div').children[2]);
+ }
+
+ function queryIsEnabledOnDecendants(accessibilityObject) {
+ accessibilityObject.isEnabled
+
+ var count = accessibilityObject.childrenCount;
+ for (var i = 0; i < count; ++i)
+ queryIsEnabledOnDecendants(accessibilityObject.childAtIndex(i));
+ }
+</script>
+<script src="../fast/js/resources/js-test-pre.js"></script>
+</head>
+<body>
+
+<div id="div">
+ <span>
+ <div>a</div>
+ </span>
+ <div style="float:left">a</div>
+ <span title="title">b</span>
+</div>
+
+<p id="description"></p>
+<div id="console"></div>
+
+<script>
+ description("In certain cases removing a decendent from an anonymous block element does not update the parent chain correctly. This can cause a crash.");
+
+ if (window.accessibilityController) {
+ // First build up full accessibility tree.
+ document.body.focus();
+ queryIsEnabledOnDecendants(accessibilityController.focusedElement);
+
+ removeElement()
+
+ // Now call isEnabled on each accessibility object.
+ document.body.focus();
+ queryIsEnabledOnDecendants(accessibilityController.focusedElement);
+ }
+
+ successfullyParsed = true;
+</script>
+
+<script src="../fast/js/resources/js-test-post.js"></script>
+</body>
+</html>
« no previous file with comments | « LayoutTests/ChangeLog ('k') | LayoutTests/accessibility/removed-anonymous-block-child-causes-crash-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698