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

Unified Diff: third_party/WebKit/LayoutTests/inspector-protocol/accessibility/accessibility-getPartialAXTree.html

Issue 2390783006: [DevTools] Accessibility: Show siblings and children of selected node (Closed)
Patch Set: Handle indirect children better Created 4 years, 1 month 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: third_party/WebKit/LayoutTests/inspector-protocol/accessibility/accessibility-getPartialAXTree.html
diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/accessibility/accessibility-getAXNodeWithAncestors.html b/third_party/WebKit/LayoutTests/inspector-protocol/accessibility/accessibility-getPartialAXTree.html
similarity index 66%
rename from third_party/WebKit/LayoutTests/inspector-protocol/accessibility/accessibility-getAXNodeWithAncestors.html
rename to third_party/WebKit/LayoutTests/inspector-protocol/accessibility/accessibility-getPartialAXTree.html
index 797b425b0d90dd65e82aef9ac3d47cee77101139..2051394bb9e99ded2f8847aef5aad7dd06426054 100644
--- a/third_party/WebKit/LayoutTests/inspector-protocol/accessibility/accessibility-getAXNodeWithAncestors.html
+++ b/third_party/WebKit/LayoutTests/inspector-protocol/accessibility/accessibility-getPartialAXTree.html
@@ -26,7 +26,7 @@ function test()
return;
}
var node = msg.result;
- InspectorTest.sendCommand("Accessibility.getAXNodeChain", { "nodeId": node.nodeId, "fetchAncestors": true }, onGotAccessibilityNodes.bind(null, node));
+ InspectorTest.sendCommand("Accessibility.getPartialAXTree", { "nodeId": node.nodeId }, onGotAccessibilityNodes.bind(null, node));
}
function onGotAccessibilityNodes(domNode, msg)
@@ -36,13 +36,19 @@ function test()
InspectorTest.completeTest();
return;
}
-
- // nodeId isn't always the same, so set it to a known value if it's present
- if (msg.result && "nodes" in msg.result) {
- for (node of msg.result.nodes) {
- if ("nodeId" in node)
- node.nodeId = "<id>";
- }
+ var result = msg.result;
+ for (var node of result.nodes) {
+ // ids aren't always the same, so set to a known value if present
+ node.nodeId = "<int>";
+ if ("parentId" in node)
+ node.parentId = "<int>";
+ if ("backendDomNodeId" in node)
+ node.backendDomNodeId = "<int>";
+ if ("childIds" in node) {
+ for (var i = 0; i < node.childIds.length; i++) {
+ node.childIds[i] = "<int>";
+ }
+ }
}
InspectorTest.log('result: ' + JSON.stringify(msg.result, null, " "));
@@ -56,6 +62,7 @@ function test()
<div role="main">
<div role="article" aria-label="Top story">
<input type="text"></input>
+ <button></button>
</div>
</div>
</body>

Powered by Google App Engine
This is Rietveld 408576698