<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[170806] trunk/LayoutTests</title>
</head>
<body>
<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; }
#msg dl a { font-weight: bold}
#msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/170806">170806</a></dd>
<dt>Author</dt> <dd>mario.prada@samsung.com</dd>
<dt>Date</dt> <dd>2014-07-04 08:31:57 -0700 (Fri, 04 Jul 2014)</dd>
</dl>
<h3>Log Message</h3>
<pre>buildAccessibilityTree() needs to be removed from individual layout tests
https://bugs.webkit.org/show_bug.cgi?id=95286
Reviewed by Chris Fleizach.
Extracted two functions to 'dump' and 'touch' the accessibility
hierarchies out of different layout tests and into a single file,
living in LayoutTests/resources/accessibility-helper.js
* resources/accessibility-helper.js: Added.
(dumpAccessibilityTree): New, based on buildAccessibilityTree()
for the cases where it was used to actually 'dump' it into the output.
(touchAccessibilityTree): Same, but for the cases where we don't
want to dump the accessibility tree, just to make sure is generated.
Updated affected layout tests to use the newly added helper functions.
* accessibility/adjacent-continuations-cause-assertion-failure.html: Updated.
* accessibility/children-changed-sends-notification.html: Ditto.
* accessibility/deleting-iframe-destroys-axcache.html: Ditto.
* accessibility/div-within-anchors-causes-crash.html: Ditto.
* accessibility/first-letter-text-transform-causes-crash.html: Ditto.
* accessibility/image-map-update-parent-crash.html: Ditto.
* accessibility/table-with-empty-thead-causes-crash.html: Ditto.
* platform/efl/accessibility/media-emits-object-replacement.html: Ditto.
* platform/gtk/accessibility/entry-and-password.html: Ditto.
* platform/gtk/accessibility/media-emits-object-replacement.html: Ditto.
* platform/gtk/accessibility/replaced-objects-in-anonymous-blocks.html: Ditto.
Updated Mac specific expectations not to print the "End of test" element.
* platform/mac-wk2/accessibility/deleting-iframe-destroys-axcache-expected.txt: Updated.
* platform/mac/accessibility/adjacent-continuations-cause-assertion-failure-expected.txt: Ditto.
* platform/mac/accessibility/deleting-iframe-destroys-axcache-expected.txt: Ditto.
* platform/mac/accessibility/div-within-anchors-causes-crash-expected.txt: Ditto.</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkLayoutTestsaccessibilityadjacentcontinuationscauseassertionfailurehtml">trunk/LayoutTests/accessibility/adjacent-continuations-cause-assertion-failure.html</a></li>
<li><a href="#trunkLayoutTestsaccessibilitychildrenchangedsendsnotificationexpectedtxt">trunk/LayoutTests/accessibility/children-changed-sends-notification-expected.txt</a></li>
<li><a href="#trunkLayoutTestsaccessibilitychildrenchangedsendsnotificationhtml">trunk/LayoutTests/accessibility/children-changed-sends-notification.html</a></li>
<li><a href="#trunkLayoutTestsaccessibilitydeletingiframedestroysaxcachehtml">trunk/LayoutTests/accessibility/deleting-iframe-destroys-axcache.html</a></li>
<li><a href="#trunkLayoutTestsaccessibilitydivwithinanchorscausescrashhtml">trunk/LayoutTests/accessibility/div-within-anchors-causes-crash.html</a></li>
<li><a href="#trunkLayoutTestsaccessibilityfirstlettertexttransformcausescrashhtml">trunk/LayoutTests/accessibility/first-letter-text-transform-causes-crash.html</a></li>
<li><a href="#trunkLayoutTestsaccessibilityimagemapupdateparentcrashhtml">trunk/LayoutTests/accessibility/image-map-update-parent-crash.html</a></li>
<li><a href="#trunkLayoutTestsaccessibilitytablewithemptytheadcausescrashhtml">trunk/LayoutTests/accessibility/table-with-empty-thead-causes-crash.html</a></li>
<li><a href="#trunkLayoutTestsplatformeflaccessibilitymediaemitsobjectreplacementhtml">trunk/LayoutTests/platform/efl/accessibility/media-emits-object-replacement.html</a></li>
<li><a href="#trunkLayoutTestsplatformgtkaccessibilityentryandpasswordhtml">trunk/LayoutTests/platform/gtk/accessibility/entry-and-password.html</a></li>
<li><a href="#trunkLayoutTestsplatformgtkaccessibilitymediaemitsobjectreplacementhtml">trunk/LayoutTests/platform/gtk/accessibility/media-emits-object-replacement.html</a></li>
<li><a href="#trunkLayoutTestsplatformgtkaccessibilityreplacedobjectsinanonymousblockshtml">trunk/LayoutTests/platform/gtk/accessibility/replaced-objects-in-anonymous-blocks.html</a></li>
<li><a href="#trunkLayoutTestsplatformmacaccessibilityadjacentcontinuationscauseassertionfailureexpectedtxt">trunk/LayoutTests/platform/mac/accessibility/adjacent-continuations-cause-assertion-failure-expected.txt</a></li>
<li><a href="#trunkLayoutTestsplatformmacaccessibilitydeletingiframedestroysaxcacheexpectedtxt">trunk/LayoutTests/platform/mac/accessibility/deleting-iframe-destroys-axcache-expected.txt</a></li>
<li><a href="#trunkLayoutTestsplatformmacaccessibilitydivwithinanchorscausescrashexpectedtxt">trunk/LayoutTests/platform/mac/accessibility/div-within-anchors-causes-crash-expected.txt</a></li>
<li><a href="#trunkLayoutTestsplatformmacwk2accessibilitydeletingiframedestroysaxcacheexpectedtxt">trunk/LayoutTests/platform/mac-wk2/accessibility/deleting-iframe-destroys-axcache-expected.txt</a></li>
</ul>
<h3>Added Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsresourcesaccessibilityhelperjs">trunk/LayoutTests/resources/accessibility-helper.js</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (170805 => 170806)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2014-07-04 13:55:55 UTC (rev 170805)
+++ trunk/LayoutTests/ChangeLog        2014-07-04 15:31:57 UTC (rev 170806)
</span><span class="lines">@@ -1,3 +1,41 @@
</span><ins>+2014-07-04 Mario Sanchez Prada <mario.prada@samsung.com>
+
+ buildAccessibilityTree() needs to be removed from individual layout tests
+ https://bugs.webkit.org/show_bug.cgi?id=95286
+
+ Reviewed by Chris Fleizach.
+
+ Extracted two functions to 'dump' and 'touch' the accessibility
+ hierarchies out of different layout tests and into a single file,
+ living in LayoutTests/resources/accessibility-helper.js
+
+ * resources/accessibility-helper.js: Added.
+ (dumpAccessibilityTree): New, based on buildAccessibilityTree()
+ for the cases where it was used to actually 'dump' it into the output.
+ (touchAccessibilityTree): Same, but for the cases where we don't
+ want to dump the accessibility tree, just to make sure is generated.
+
+ Updated affected layout tests to use the newly added helper functions.
+
+ * accessibility/adjacent-continuations-cause-assertion-failure.html: Updated.
+ * accessibility/children-changed-sends-notification.html: Ditto.
+ * accessibility/deleting-iframe-destroys-axcache.html: Ditto.
+ * accessibility/div-within-anchors-causes-crash.html: Ditto.
+ * accessibility/first-letter-text-transform-causes-crash.html: Ditto.
+ * accessibility/image-map-update-parent-crash.html: Ditto.
+ * accessibility/table-with-empty-thead-causes-crash.html: Ditto.
+ * platform/efl/accessibility/media-emits-object-replacement.html: Ditto.
+ * platform/gtk/accessibility/entry-and-password.html: Ditto.
+ * platform/gtk/accessibility/media-emits-object-replacement.html: Ditto.
+ * platform/gtk/accessibility/replaced-objects-in-anonymous-blocks.html: Ditto.
+
+ Updated Mac specific expectations not to print the "End of test" element.
+
+ * platform/mac-wk2/accessibility/deleting-iframe-destroys-axcache-expected.txt: Updated.
+ * platform/mac/accessibility/adjacent-continuations-cause-assertion-failure-expected.txt: Ditto.
+ * platform/mac/accessibility/deleting-iframe-destroys-axcache-expected.txt: Ditto.
+ * platform/mac/accessibility/div-within-anchors-causes-crash-expected.txt: Ditto.
+
</ins><span class="cx"> 2014-07-04 Antti Koivisto <antti@apple.com>
</span><span class="cx">
</span><span class="cx"> REGRESSION(r159345): Lines are clipped between pages when printing web content from Safari
</span></span></pre></div>
<a id="trunkLayoutTestsaccessibilityadjacentcontinuationscauseassertionfailurehtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/accessibility/adjacent-continuations-cause-assertion-failure.html (170805 => 170806)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/accessibility/adjacent-continuations-cause-assertion-failure.html        2014-07-04 13:55:55 UTC (rev 170805)
+++ trunk/LayoutTests/accessibility/adjacent-continuations-cause-assertion-failure.html        2014-07-04 15:31:57 UTC (rev 170806)
</span><span class="lines">@@ -1,36 +1,14 @@
</span><span class="cx"> <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
</span><span class="cx"> <html>
</span><span class="cx"> <head>
</span><del>-<script>
-
- function buildAccessibilityTree(accessibilityObject, indent) {
- var str = "";
- for (var i = 0; i < indent; i++)
- str += " ";
- str += accessibilityObject.role;
- str += " " + accessibilityObject.stringValue;
- str += "\n";
- document.getElementById("tree").innerText += str;
-
- if (accessibilityObject.stringValue.indexOf('End of test') >= 0)
- return false;
-
- var count = accessibilityObject.childrenCount;
- for (var i = 0; i < count; ++i) {
- if (!buildAccessibilityTree(accessibilityObject.childAtIndex(i), indent + 1))
- return false;
- }
-
- return true;
- }
-</script>
</del><span class="cx"> <script src="../resources/js-test-pre.js"></script>
</span><ins>+<script src="../resources/accessibility-helper.js"></script>
</ins><span class="cx"> </head>
</span><span class="cx"> <body>
</span><span class="cx">
</span><span class="cx"> <span><div></div></span><span>x<div>y</div>z</span>
</span><span class="cx">
</span><del>-<div>End of test</div>
</del><ins>+<div id="stopElement">End of test</div>
</ins><span class="cx">
</span><span class="cx"> <p id="description"></p>
</span><span class="cx"> <pre id="tree"></pre>
</span><span class="lines">@@ -41,8 +19,10 @@
</span><span class="cx">
</span><span class="cx"> if (window.accessibilityController) {
</span><span class="cx"> // Build the accessibility tree up until 'End of test' is encountered.
</span><ins>+ window.stopElement = accessibilityController.accessibleElementById("stopElement")
+
</ins><span class="cx"> document.body.focus();
</span><del>- buildAccessibilityTree(accessibilityController.focusedElement, 0);
</del><ins>+ dumpAccessibilityTree(accessibilityController.focusedElement, stopElement, 0);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> </script>
</span></span></pre></div>
<a id="trunkLayoutTestsaccessibilitychildrenchangedsendsnotificationexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/accessibility/children-changed-sends-notification-expected.txt (170805 => 170806)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/accessibility/children-changed-sends-notification-expected.txt        2014-07-04 13:55:55 UTC (rev 170805)
+++ trunk/LayoutTests/accessibility/children-changed-sends-notification-expected.txt        2014-07-04 15:31:57 UTC (rev 170806)
</span><span class="lines">@@ -5,7 +5,6 @@
</span><span class="cx">
</span><span class="cx"> Plain text paragraph
</span><span class="cx">
</span><del>-End of test
</del><span class="cx"> PARAGRAPH notification: AXChildrenAdded
</span><span class="cx"> GLOBAL notification: AXChildrenAdded on element with role AXRole: AXParagraph
</span><span class="cx"> PARAGRAPH notification: AXChildrenRemoved
</span></span></pre></div>
<a id="trunkLayoutTestsaccessibilitychildrenchangedsendsnotificationhtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/accessibility/children-changed-sends-notification.html (170805 => 170806)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/accessibility/children-changed-sends-notification.html        2014-07-04 13:55:55 UTC (rev 170805)
+++ trunk/LayoutTests/accessibility/children-changed-sends-notification.html        2014-07-04 15:31:57 UTC (rev 170806)
</span><span class="lines">@@ -1,12 +1,12 @@
</span><span class="cx"> <html>
</span><span class="cx"> <head>
</span><span class="cx"> <script src="../resources/js-test-pre.js"></script>
</span><ins>+<script src="../resources/accessibility-helper.js"></script>
</ins><span class="cx"> </head>
</span><span class="cx"> <body>
</span><span class="cx">
</span><span class="cx"> <p id="description"></p>
</span><span class="cx"> <p id="paragraph">Plain text paragraph <a id="testLink" href="#">with a link at the end</a></p>
</span><del>-<div>End of test</div>
</del><span class="cx">
</span><span class="cx"> <div id="console"></div>
</span><span class="cx">
</span><span class="lines">@@ -15,19 +15,6 @@
</span><span class="cx">
</span><span class="cx"> description("This test ensures that a notification is being emitted when children are added or removed for an accessibility object");
</span><span class="cx">
</span><del>-function touchAccessibilityTree(accessibilityObject) {
- if (accessibilityObject.stringValue.indexOf('End of test') >= 0)
- return false;
-
- var count = accessibilityObject.childrenCount;
- for (var i = 0; i < count; ++i) {
- if (!touchAccessibilityTree(accessibilityObject.childAtIndex(i)))
- return false;
- }
-
- return true;
-}
-
</del><span class="cx"> function runTest() {
</span><span class="cx"> window.paragraphNotificationCount = 0;
</span><span class="cx"> window.globalNotificationCount = 0;
</span></span></pre></div>
<a id="trunkLayoutTestsaccessibilitydeletingiframedestroysaxcachehtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/accessibility/deleting-iframe-destroys-axcache.html (170805 => 170806)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/accessibility/deleting-iframe-destroys-axcache.html        2014-07-04 13:55:55 UTC (rev 170805)
+++ trunk/LayoutTests/accessibility/deleting-iframe-destroys-axcache.html        2014-07-04 15:31:57 UTC (rev 170806)
</span><span class="lines">@@ -1,42 +1,19 @@
</span><span class="cx"> <html>
</span><span class="cx"> <head>
</span><span class="cx"> <script src="../resources/js-test-pre.js"></script>
</span><del>-
- <script>
</del><ins>+<script src="../resources/accessibility-helper.js"></script>
+<script>
</ins><span class="cx"> if (window.testRunner)
</span><span class="cx"> testRunner.waitUntilDone();
</span><span class="cx">
</span><del>- function buildAccessibilityTree(accessibilityObject, indent) {
- var str = "";
- for (var i = 0; i < indent; i++)
- str += " ";
- str += accessibilityObject.role;
- str += " " + accessibilityObject.stringValue;
-
- if (accessibilityObject.role == '')
- str += accessibilityObject.allAttributes();
-
- str += "\n";
- document.getElementById("console").innerText += str;
-
- if (accessibilityObject.stringValue.indexOf('End of test') >= 0)
- return false;
-
- var count = accessibilityObject.childrenCount;
- for (var i = 0; i < count; ++i) {
- if (!buildAccessibilityTree(accessibilityObject.childAtIndex(i), indent + 1))
- return false;
- }
-
- return true;
- }
-
</del><span class="cx"> function runTest()
</span><span class="cx"> {
</span><span class="cx"> description("This tests that deleting an iframe doesn't cause the accessibility cache to be destroyed and recreated.");
</span><span class="cx">
</span><span class="cx"> if (window.accessibilityController) {
</span><span class="cx"> window.root = accessibilityController.rootElement;
</span><ins>+ window.stopElement = accessibilityController.accessibleElementById("stopElement");
+
</ins><span class="cx"> window.body = root.childAtIndex(0);
</span><span class="cx"> window.before = body.childAtIndex(0);
</span><span class="cx"> window.iframe = body.childAtIndex(1).childAtIndex(0);
</span><span class="lines">@@ -49,8 +26,8 @@
</span><span class="cx"> window.frameButton = window.frameGroup.childAtIndex(0);
</span><span class="cx"> window.frameButtonRole = window.frameButton.role;
</span><span class="cx">
</span><del>- document.getElementById("console").innerText += "\nBefore:\n";
- buildAccessibilityTree(root, 0);
</del><ins>+ document.getElementById("tree").innerText += "\nBefore:\n";
+ dumpAccessibilityTree(root, stopElement, 0, true);
</ins><span class="cx">
</span><span class="cx"> // Remove the iframe.
</span><span class="cx"> document.body.removeChild(document.getElementById("iframe"));
</span><span class="lines">@@ -60,9 +37,9 @@
</span><span class="cx"> window.newBefore = newBody.childAtIndex(0);
</span><span class="cx"> window.newAfter = newBody.childAtIndex(1);
</span><span class="cx">
</span><del>- document.getElementById("console").innerText += "\nAfter:\n";
- buildAccessibilityTree(newRoot, 0);
- document.getElementById("console").innerText += "\n";
</del><ins>+ document.getElementById("tree").innerText += "\nAfter:\n";
+ dumpAccessibilityTree(newRoot, stopElement, 0, true);
+ document.getElementById("tree").innerText += "\n";
</ins><span class="cx">
</span><span class="cx"> // Make sure that the accessibility objects from the iframe's nodes
</span><span class="cx"> // are now invalid by checking that their role is changed - this
</span><span class="lines">@@ -97,9 +74,10 @@
</span><span class="cx">
</span><span class="cx"> <p>After</p>
</span><span class="cx">
</span><del>-<p>End of test</p>
</del><ins>+<p id="stopElement">End of test</p>
</ins><span class="cx">
</span><span class="cx"> <p id="description"></p>
</span><ins>+<pre id="tree"></pre>
</ins><span class="cx"> <div id="console"></div>
</span><span class="cx">
</span><span class="cx"> </body>
</span></span></pre></div>
<a id="trunkLayoutTestsaccessibilitydivwithinanchorscausescrashhtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/accessibility/div-within-anchors-causes-crash.html (170805 => 170806)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/accessibility/div-within-anchors-causes-crash.html        2014-07-04 13:55:55 UTC (rev 170805)
+++ trunk/LayoutTests/accessibility/div-within-anchors-causes-crash.html        2014-07-04 15:31:57 UTC (rev 170806)
</span><span class="lines">@@ -1,30 +1,8 @@
</span><span class="cx"> <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
</span><span class="cx"> <html>
</span><span class="cx"> <head>
</span><del>-<script>
-
- function buildAccessibilityTree(accessibilityObject, indent) {
- var str = "";
- for (var i = 0; i < indent; i++)
- str += " ";
- str += accessibilityObject.role;
- str += " " + accessibilityObject.stringValue;
- str += "\n";
- document.getElementById("tree").innerText += str;
-
- if (accessibilityObject.stringValue.indexOf('End of test') >= 0)
- return false;
-
- var count = accessibilityObject.childrenCount;
- for (var i = 0; i < count; ++i) {
- if (!buildAccessibilityTree(accessibilityObject.childAtIndex(i), indent + 1))
- return false;
- }
-
- return true;
- }
-</script>
</del><span class="cx"> <script src="../resources/js-test-pre.js"></script>
</span><ins>+<script src="../resources/accessibility-helper.js"></script>
</ins><span class="cx"> </head>
</span><span class="cx"> <body>
</span><span class="cx">
</span><span class="lines">@@ -34,7 +12,7 @@
</span><span class="cx">
</span><span class="cx"> <a href="about:blank"><div></div></a>
</span><span class="cx">
</span><del>-<div>End of test</div>
</del><ins>+<div id="stopElement">End of test</div>
</ins><span class="cx">
</span><span class="cx"> <pre id="tree"></pre>
</span><span class="cx">
</span><span class="lines">@@ -46,17 +24,19 @@
</span><span class="cx">
</span><span class="cx"> if (window.accessibilityController) {
</span><span class="cx"> // First build up full accessibility tree.
</span><ins>+ window.stopElement = accessibilityController.accessibleElementById("stopElement");
+
</ins><span class="cx"> document.getElementById("tree").innerText += "Before:\n";
</span><span class="cx"> document.body.focus();
</span><del>- buildAccessibilityTree(accessibilityController.focusedElement, 0);
-
</del><ins>+ dumpAccessibilityTree(accessibilityController.focusedElement, stopElement, 0);
+
</ins><span class="cx"> // Remove anchor that causes debug assert in AccessibilityRenderObject::addChildren
</span><span class="cx"> document.body.removeChild(document.body.children[2])
</span><span class="cx">
</span><span class="cx"> // Build up full accessibility tree again.
</span><span class="cx"> document.getElementById("tree").innerText += "After:\n";
</span><span class="cx"> document.body.focus();
</span><del>- buildAccessibilityTree(accessibilityController.focusedElement, 0);
</del><ins>+ dumpAccessibilityTree(accessibilityController.focusedElement, stopElement, 0);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> </script>
</span></span></pre></div>
<a id="trunkLayoutTestsaccessibilityfirstlettertexttransformcausescrashhtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/accessibility/first-letter-text-transform-causes-crash.html (170805 => 170806)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/accessibility/first-letter-text-transform-causes-crash.html        2014-07-04 13:55:55 UTC (rev 170805)
+++ trunk/LayoutTests/accessibility/first-letter-text-transform-causes-crash.html        2014-07-04 15:31:57 UTC (rev 170806)
</span><span class="lines">@@ -4,15 +4,8 @@
</span><span class="cx"> <style>
</span><span class="cx"> dt:first-letter{text-transform:uppercase;}
</span><span class="cx"> </style>
</span><del>-<script>
-
- function buildAccessibilityTree(accessibilityObject) {
- var count = accessibilityObject.childrenCount;
- for (var i = 0; i < count; ++i)
- buildAccessibilityTree(accessibilityObject.childAtIndex(i));
- }
-</script>
</del><span class="cx"> <script src="../resources/js-test-pre.js"></script>
</span><ins>+<script src="../resources/accessibility-helper.js"></script>
</ins><span class="cx"> </head>
</span><span class="cx"> <body>
</span><span class="cx">
</span><span class="lines">@@ -30,7 +23,7 @@
</span><span class="cx"> if (window.accessibilityController) {
</span><span class="cx"> // Build up full accessibility tree.
</span><span class="cx"> document.body.focus();
</span><del>- buildAccessibilityTree(accessibilityController.focusedElement);
</del><ins>+ touchAccessibilityTree(accessibilityController.focusedElement);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> </script>
</span></span></pre></div>
<a id="trunkLayoutTestsaccessibilityimagemapupdateparentcrashhtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/accessibility/image-map-update-parent-crash.html (170805 => 170806)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/accessibility/image-map-update-parent-crash.html        2014-07-04 13:55:55 UTC (rev 170805)
+++ trunk/LayoutTests/accessibility/image-map-update-parent-crash.html        2014-07-04 15:31:57 UTC (rev 170806)
</span><span class="lines">@@ -1,34 +1,24 @@
</span><span class="cx"> <html>
</span><span class="cx"> <head>
</span><span class="cx"> <script src="../resources/js-test-pre.js"></script>
</span><del>-
</del><ins>+<script src="../resources/accessibility-helper.js"></script>
</ins><span class="cx"> <script>
</span><span class="cx">
</span><span class="cx"> if (window.testRunner)
</span><span class="cx"> testRunner.waitUntilDone();
</span><span class="cx">
</span><del>-function buildAccessibilityTree(accessibilityObject, indent) {
- var count = accessibilityObject.childrenCount;
- for (var i = 0; i < count; ++i) {
- if (!buildAccessibilityTree(accessibilityObject.childAtIndex(i), indent + 1))
- return false;
- }
-
- return true;
-}
-
</del><span class="cx"> function runAXTest() {
</span><span class="cx">
</span><span class="cx">
</span><span class="cx"> description("This tests that an image map's hold on it's parent will be cleared if the parent goes away.");
</span><span class="cx">
</span><span class="cx"> // First access all children using AX
</span><del>- buildAccessibilityTree(accessibilityController.rootElement, 0);
</del><ins>+ touchAccessibilityTree(accessibilityController.rootElement);
</ins><span class="cx">
</span><span class="cx"> var child = document.getElementById('img'); child.parentNode.removeChild(child);
</span><del>-
</del><ins>+
</ins><span class="cx"> // Now verify we haven't crashed.
</span><del>- buildAccessibilityTree(accessibilityController.rootElement, 0);
</del><ins>+ touchAccessibilityTree(accessibilityController.rootElement);
</ins><span class="cx">
</span><span class="cx"> if (window.testRunner)
</span><span class="cx"> testRunner.notifyDone();
</span></span></pre></div>
<a id="trunkLayoutTestsaccessibilitytablewithemptytheadcausescrashhtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/accessibility/table-with-empty-thead-causes-crash.html (170805 => 170806)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/accessibility/table-with-empty-thead-causes-crash.html        2014-07-04 13:55:55 UTC (rev 170805)
+++ trunk/LayoutTests/accessibility/table-with-empty-thead-causes-crash.html        2014-07-04 15:31:57 UTC (rev 170806)
</span><span class="lines">@@ -1,17 +1,8 @@
</span><span class="cx"> <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
</span><span class="cx"> <html>
</span><span class="cx"> <head>
</span><del>-<script>
-
- function buildAccessibilityTree(accessibilityObject) {
- accessibilityObject.isEnabled
-
- var count = accessibilityObject.childrenCount;
- for (var i = 0; i < count; ++i)
- buildAccessibilityTree(accessibilityObject.childAtIndex(i));
- }
-</script>
</del><span class="cx"> <script src="../resources/js-test-pre.js"></script>
</span><ins>+<script src="../resources/accessibility-helper.js"></script>
</ins><span class="cx"> </head>
</span><span class="cx"> <body>
</span><span class="cx">
</span><span class="lines">@@ -29,7 +20,7 @@
</span><span class="cx">
</span><span class="cx"> if (window.accessibilityController) {
</span><span class="cx"> document.body.focus();
</span><del>- buildAccessibilityTree(accessibilityController.focusedElement);
</del><ins>+ touchAccessibilityTree(accessibilityController.focusedElement);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> </script>
</span></span></pre></div>
<a id="trunkLayoutTestsplatformeflaccessibilitymediaemitsobjectreplacementhtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/platform/efl/accessibility/media-emits-object-replacement.html (170805 => 170806)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/efl/accessibility/media-emits-object-replacement.html        2014-07-04 13:55:55 UTC (rev 170805)
+++ trunk/LayoutTests/platform/efl/accessibility/media-emits-object-replacement.html        2014-07-04 15:31:57 UTC (rev 170806)
</span><span class="lines">@@ -1,29 +1,8 @@
</span><span class="cx"> <!DOCTYPE HTML>
</span><span class="cx"> <html>
</span><span class="cx"> <head>
</span><del>-<script>
-function buildAccessibilityTree(accessibilityObject, indent) {
- var str = "";
- for (var i = 0; i < indent; i++)
- str += " ";
- str += accessibilityObject.role;
- str += " " + accessibilityObject.stringValue;
- str += "\n";
- document.getElementById("tree").innerText += str;
-
- if (accessibilityObject.stringValue.indexOf('End of test') >= 0)
- return false;
-
- var count = accessibilityObject.childrenCount;
- for (var i = 0; i < count; ++i) {
- if (!buildAccessibilityTree(accessibilityObject.childAtIndex(i), indent + 1))
- return false;
- }
-
- return true;
-}
-</script>
</del><span class="cx"> <script src="../../../resources/js-test-pre.js"></script>
</span><ins>+<script src="../../../resources/accessibility-helper.js"></script>
</ins><span class="cx"> </head>
</span><span class="cx"> <body>
</span><span class="cx">
</span><span class="lines">@@ -39,7 +18,7 @@
</span><span class="cx">
</span><span class="cx"> </div>
</span><span class="cx">
</span><del>-<div>End of test</div>
</del><ins>+<div id="stopElement">End of test</div>
</ins><span class="cx">
</span><span class="cx"> <pre id="tree"></pre>
</span><span class="cx">
</span><span class="lines">@@ -51,8 +30,10 @@
</span><span class="cx">
</span><span class="cx"> if (window.accessibilityController) {
</span><span class="cx"> // Build the accessibility tree up until 'End of test' is encountered.
</span><ins>+ window.stopElement = accessibilityController.accessibleElementById("stopElement");
+
</ins><span class="cx"> document.body.focus();
</span><del>- buildAccessibilityTree(accessibilityController.focusedElement, 0);
</del><ins>+ dumpAccessibilityTree(accessibilityController.focusedElement, stopElement, 0);
</ins><span class="cx"> }
</span><span class="cx"> </script>
</span><span class="cx"> <script src="../../../resources/js-test-post.js"></script>
</span></span></pre></div>
<a id="trunkLayoutTestsplatformgtkaccessibilityentryandpasswordhtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/platform/gtk/accessibility/entry-and-password.html (170805 => 170806)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/gtk/accessibility/entry-and-password.html        2014-07-04 13:55:55 UTC (rev 170805)
+++ trunk/LayoutTests/platform/gtk/accessibility/entry-and-password.html        2014-07-04 15:31:57 UTC (rev 170806)
</span><span class="lines">@@ -1,30 +1,8 @@
</span><span class="cx"> <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
</span><span class="cx"> <html>
</span><span class="cx"> <head>
</span><del>-<script>
-
- function buildAccessibilityTree(accessibilityObject, indent) {
- var str = "";
- for (var i = 0; i < indent; i++)
- str += " ";
- str += accessibilityObject.role;
- str += " " + accessibilityObject.stringValue;
- str += "\n";
- document.getElementById("tree").innerText += str;
-
- if (accessibilityObject.stringValue.indexOf('End of test') >= 0)
- return false;
-
- var count = accessibilityObject.childrenCount;
- for (var i = 0; i < count; ++i) {
- if (!buildAccessibilityTree(accessibilityObject.childAtIndex(i), indent + 1))
- return false;
- }
-
- return true;
- }
-</script>
</del><span class="cx"> <script src="../../../resources/js-test-pre.js"></script>
</span><ins>+<script src="../../../resources/accessibility-helper.js"></script>
</ins><span class="cx"> </head>
</span><span class="cx"> <body>
</span><span class="cx">
</span><span class="lines">@@ -33,7 +11,7 @@
</span><span class="cx"> <input type='password' name='passwordEntry' value='123' />
</span><span class="cx"> </form>
</span><span class="cx">
</span><del>-<div>End of test</div>
</del><ins>+<div id="stopElement">End of test</div>
</ins><span class="cx">
</span><span class="cx"> <pre id="tree"></pre>
</span><span class="cx">
</span><span class="lines">@@ -45,8 +23,10 @@
</span><span class="cx">
</span><span class="cx"> if (window.accessibilityController) {
</span><span class="cx"> // Build the accessibility tree up until 'End of test' is encountered.
</span><ins>+ window.stopElement = accessibilityController.accessibleElementById("stopElement");
+
</ins><span class="cx"> document.body.focus();
</span><del>- buildAccessibilityTree(accessibilityController.focusedElement, 0);
</del><ins>+ dumpAccessibilityTree(accessibilityController.focusedElement, stopElement, 0);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> </script>
</span></span></pre></div>
<a id="trunkLayoutTestsplatformgtkaccessibilitymediaemitsobjectreplacementhtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/platform/gtk/accessibility/media-emits-object-replacement.html (170805 => 170806)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/gtk/accessibility/media-emits-object-replacement.html        2014-07-04 13:55:55 UTC (rev 170805)
+++ trunk/LayoutTests/platform/gtk/accessibility/media-emits-object-replacement.html        2014-07-04 15:31:57 UTC (rev 170806)
</span><span class="lines">@@ -1,29 +1,8 @@
</span><span class="cx"> <!DOCTYPE HTML>
</span><span class="cx"> <html>
</span><span class="cx"> <head>
</span><del>-<script>
-function buildAccessibilityTree(accessibilityObject, indent) {
- var str = "";
- for (var i = 0; i < indent; i++)
- str += " ";
- str += accessibilityObject.role;
- str += " " + accessibilityObject.stringValue;
- str += "\n";
- document.getElementById("tree").innerText += str;
-
- if (accessibilityObject.stringValue.indexOf('End of test') >= 0)
- return false;
-
- var count = accessibilityObject.childrenCount;
- for (var i = 0; i < count; ++i) {
- if (!buildAccessibilityTree(accessibilityObject.childAtIndex(i), indent + 1))
- return false;
- }
-
- return true;
-}
-</script>
</del><span class="cx"> <script src="../../../resources/js-test-pre.js"></script>
</span><ins>+<script src="../../../resources/accessibility-helper.js"></script>
</ins><span class="cx"> </head>
</span><span class="cx"> <body>
</span><span class="cx">
</span><span class="lines">@@ -39,7 +18,7 @@
</span><span class="cx">
</span><span class="cx"> </div>
</span><span class="cx">
</span><del>-<div>End of test</div>
</del><ins>+<div id="stopElement">End of test</div>
</ins><span class="cx">
</span><span class="cx"> <pre id="tree"></pre>
</span><span class="cx">
</span><span class="lines">@@ -51,8 +30,10 @@
</span><span class="cx">
</span><span class="cx"> if (window.accessibilityController) {
</span><span class="cx"> // Build the accessibility tree up until 'End of test' is encountered.
</span><ins>+ window.stopElement = accessibilityController.accessibleElementById("stopElement");
+
</ins><span class="cx"> document.body.focus();
</span><del>- buildAccessibilityTree(accessibilityController.focusedElement, 0);
</del><ins>+ dumpAccessibilityTree(accessibilityController.focusedElement, stopElement, 0);
</ins><span class="cx"> }
</span><span class="cx"> </script>
</span><span class="cx"> <script src="../../../resources/js-test-post.js"></script>
</span></span></pre></div>
<a id="trunkLayoutTestsplatformgtkaccessibilityreplacedobjectsinanonymousblockshtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/platform/gtk/accessibility/replaced-objects-in-anonymous-blocks.html (170805 => 170806)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/gtk/accessibility/replaced-objects-in-anonymous-blocks.html        2014-07-04 13:55:55 UTC (rev 170805)
+++ trunk/LayoutTests/platform/gtk/accessibility/replaced-objects-in-anonymous-blocks.html        2014-07-04 15:31:57 UTC (rev 170806)
</span><span class="lines">@@ -1,30 +1,8 @@
</span><span class="cx"> <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
</span><span class="cx"> <html>
</span><span class="cx"> <head>
</span><del>-<script>
-
- function buildAccessibilityTree(accessibilityObject, indent) {
- var str = "";
- for (var i = 0; i < indent; i++)
- str += " ";
- str += accessibilityObject.role;
- str += " " + accessibilityObject.stringValue;
- str += "\n";
- document.getElementById("tree").innerText += str;
-
- if (accessibilityObject.stringValue.indexOf('End of test') >= 0)
- return false;
-
- var count = accessibilityObject.childrenCount;
- for (var i = 0; i < count; ++i) {
- if (!buildAccessibilityTree(accessibilityObject.childAtIndex(i), indent + 1))
- return false;
- }
-
- return true;
- }
-</script>
-<script src="../../../resources/js-test-pre.js"></script>
</del><ins>+<script src="../../../resources/js-test-pre.js"></script>
+<script src="../../../resources/accessibility-helper.js"></script>
</ins><span class="cx"> </head>
</span><span class="cx"> <body>
</span><span class="cx">
</span><span class="lines">@@ -47,7 +25,7 @@
</span><span class="cx"> <img src="foo" alt="I should be an image" />
</span><span class="cx"> </h3>
</span><span class="cx">
</span><del>-<div>End of test</div>
</del><ins>+<div id="stopElement">End of test</div>
</ins><span class="cx">
</span><span class="cx"> <pre id="tree"></pre>
</span><span class="cx">
</span><span class="lines">@@ -59,8 +37,10 @@
</span><span class="cx">
</span><span class="cx"> if (window.accessibilityController) {
</span><span class="cx"> // Build the accessibility tree up until 'End of test' is encountered.
</span><ins>+ window.stopElement = accessibilityController.accessibleElementById("stopElement");
+
</ins><span class="cx"> document.body.focus();
</span><del>- buildAccessibilityTree(accessibilityController.focusedElement, 0);
</del><ins>+ dumpAccessibilityTree(accessibilityController.focusedElement, stopElement, 0);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> </script>
</span></span></pre></div>
<a id="trunkLayoutTestsplatformmacaccessibilityadjacentcontinuationscauseassertionfailureexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/platform/mac/accessibility/adjacent-continuations-cause-assertion-failure-expected.txt (170805 => 170806)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/mac/accessibility/adjacent-continuations-cause-assertion-failure-expected.txt        2014-07-04 13:55:55 UTC (rev 170805)
+++ trunk/LayoutTests/platform/mac/accessibility/adjacent-continuations-cause-assertion-failure-expected.txt        2014-07-04 15:31:57 UTC (rev 170806)
</span><span class="lines">@@ -13,7 +13,6 @@
</span><span class="cx"> AXRole: AXStaticText AXValue: y
</span><span class="cx"> AXRole: AXStaticText AXValue: z
</span><span class="cx"> AXRole: AXGroup AXValue:
</span><del>- AXRole: AXStaticText AXValue: End of test
</del><span class="cx"> PASS successfullyParsed is true
</span><span class="cx">
</span><span class="cx"> TEST COMPLETE
</span></span></pre></div>
<a id="trunkLayoutTestsplatformmacaccessibilitydeletingiframedestroysaxcacheexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/platform/mac/accessibility/deleting-iframe-destroys-axcache-expected.txt (170805 => 170806)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/mac/accessibility/deleting-iframe-destroys-axcache-expected.txt        2014-07-04 13:55:55 UTC (rev 170805)
+++ trunk/LayoutTests/platform/mac/accessibility/deleting-iframe-destroys-axcache-expected.txt        2014-07-04 15:31:57 UTC (rev 170806)
</span><span class="lines">@@ -23,7 +23,6 @@
</span><span class="cx"> AXRole: AXGroup AXValue:
</span><span class="cx"> AXRole: AXStaticText AXValue: After
</span><span class="cx"> AXRole: AXGroup AXValue:
</span><del>- AXRole: AXStaticText AXValue: End of test
</del><span class="cx">
</span><span class="cx"> After:
</span><span class="cx"> AXRole: AXScrollArea
</span><span class="lines">@@ -33,7 +32,6 @@
</span><span class="cx"> AXRole: AXGroup AXValue:
</span><span class="cx"> AXRole: AXStaticText AXValue: After
</span><span class="cx"> AXRole: AXGroup AXValue:
</span><del>- AXRole: AXStaticText AXValue: End of test
</del><span class="cx">
</span><span class="cx"> PASS frameBodyRole == frameBody.role is false
</span><span class="cx"> PASS frameGroupRole == frameGroup.role is false
</span></span></pre></div>
<a id="trunkLayoutTestsplatformmacaccessibilitydivwithinanchorscausescrashexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/platform/mac/accessibility/div-within-anchors-causes-crash-expected.txt (170805 => 170806)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/mac/accessibility/div-within-anchors-causes-crash-expected.txt        2014-07-04 13:55:55 UTC (rev 170805)
+++ trunk/LayoutTests/platform/mac/accessibility/div-within-anchors-causes-crash-expected.txt        2014-07-04 15:31:57 UTC (rev 170806)
</span><span class="lines">@@ -3,11 +3,9 @@
</span><span class="cx"> AXRole: AXWebArea AXValue:
</span><span class="cx"> AXRole: AXLink AXValue:
</span><span class="cx"> AXRole: AXGroup AXValue:
</span><del>- AXRole: AXStaticText AXValue: End of test
</del><span class="cx"> After:
</span><span class="cx"> AXRole: AXWebArea AXValue:
</span><span class="cx"> AXRole: AXGroup AXValue:
</span><del>- AXRole: AXStaticText AXValue: End of test
</del><span class="cx"> This can cause a crash.
</span><span class="cx">
</span><span class="cx"> On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
</span></span></pre></div>
<a id="trunkLayoutTestsplatformmacwk2accessibilitydeletingiframedestroysaxcacheexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/platform/mac-wk2/accessibility/deleting-iframe-destroys-axcache-expected.txt (170805 => 170806)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/mac-wk2/accessibility/deleting-iframe-destroys-axcache-expected.txt        2014-07-04 13:55:55 UTC (rev 170805)
+++ trunk/LayoutTests/platform/mac-wk2/accessibility/deleting-iframe-destroys-axcache-expected.txt        2014-07-04 15:31:57 UTC (rev 170806)
</span><span class="lines">@@ -23,7 +23,6 @@
</span><span class="cx"> AXRole: AXGroup AXValue:
</span><span class="cx"> AXRole: AXStaticText AXValue: After
</span><span class="cx"> AXRole: AXGroup AXValue:
</span><del>- AXRole: AXStaticText AXValue: End of test
</del><span class="cx">
</span><span class="cx"> After:
</span><span class="cx"> AXRole: AXScrollArea AXValue:
</span><span class="lines">@@ -33,7 +32,6 @@
</span><span class="cx"> AXRole: AXGroup AXValue:
</span><span class="cx"> AXRole: AXStaticText AXValue: After
</span><span class="cx"> AXRole: AXGroup AXValue:
</span><del>- AXRole: AXStaticText AXValue: End of test
</del><span class="cx">
</span><span class="cx"> PASS frameBodyRole == frameBody.role is false
</span><span class="cx"> PASS frameGroupRole == frameGroup.role is false
</span></span></pre></div>
<a id="trunkLayoutTestsresourcesaccessibilityhelperjs"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/resources/accessibility-helper.js (0 => 170806)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/resources/accessibility-helper.js         (rev 0)
+++ trunk/LayoutTests/resources/accessibility-helper.js        2014-07-04 15:31:57 UTC (rev 170806)
</span><span class="lines">@@ -0,0 +1,34 @@
</span><ins>+function dumpAccessibilityTree(accessibilityObject, stopElement, indent, allAttributesIfNeeded) {
+ var str = "";
+ var i = 0;
+
+ for (i = 0; i < indent; i++)
+ str += " ";
+ str += accessibilityObject.role;
+ str += " " + accessibilityObject.stringValue;
+ str += allAttributesIfNeeded && accessibilityObject.role == '' ? accessibilityObject.allAttributes() : '';
+ str += "\n";
+
+ document.getElementById("tree").innerText += str;
+
+ if (stopElement && stopElement.isEqual(accessibilityObject))
+ return;
+
+ var count = accessibilityObject.childrenCount;
+ for (i = 0; i < count; ++i) {
+ if (!dumpAccessibilityTree(accessibilityObject.childAtIndex(i), stopElement, indent + 1, allAttributesIfNeeded))
+ return false;
+ }
+
+ return true;
+}
+
+function touchAccessibilityTree(accessibilityObject) {
+ var count = accessibilityObject.childrenCount;
+ for (var i = 0; i < count; ++i) {
+ if (!touchAccessibilityTree(accessibilityObject.childAtIndex(i)))
+ return false;
+ }
+
+ return true;
+}
</ins></span></pre>
</div>
</div>
</body>
</html>