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

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

Issue 2322413003: Show ancestor hierarchy in accessibility panel (Closed)
Patch Set: Add new test for ancestors 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/LayoutTests/inspector-protocol/accessibility/accessibility-getAXNodeWithAncestors.html
diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/accessibility/accessibility-getAXNode.html b/third_party/WebKit/LayoutTests/inspector-protocol/accessibility/accessibility-getAXNodeWithAncestors.html
similarity index 69%
copy from third_party/WebKit/LayoutTests/inspector-protocol/accessibility/accessibility-getAXNode.html
copy to third_party/WebKit/LayoutTests/inspector-protocol/accessibility/accessibility-getAXNodeWithAncestors.html
index 0759862ff1ab614ef7de6d5d611ba8fb451bcd99..797b425b0d90dd65e82aef9ac3d47cee77101139 100644
--- a/third_party/WebKit/LayoutTests/inspector-protocol/accessibility/accessibility-getAXNode.html
+++ b/third_party/WebKit/LayoutTests/inspector-protocol/accessibility/accessibility-getAXNodeWithAncestors.html
@@ -26,10 +26,10 @@ function test()
return;
}
var node = msg.result;
- InspectorTest.sendCommand("Accessibility.getAXNode", { "nodeId": node.nodeId }, onGotAccessibilityNode.bind(null, node));
+ InspectorTest.sendCommand("Accessibility.getAXNodeChain", { "nodeId": node.nodeId, "fetchAncestors": true }, onGotAccessibilityNodes.bind(null, node));
}
- function onGotAccessibilityNode(domNode, msg)
+ function onGotAccessibilityNodes(domNode, msg)
{
if (msg.error) {
InspectorTest.log(msg.error.message);
@@ -38,8 +38,12 @@ function test()
}
// nodeId isn't always the same, so set it to a known value if it's present
- if (msg.result && "accessibilityNode" in msg.result && "nodeId" in msg.result.accessibilityNode)
- msg.result.accessibilityNode.nodeId = "3";
+ if (msg.result && "nodes" in msg.result) {
+ for (node of msg.result.nodes) {
+ if ("nodeId" in node)
+ node.nodeId = "<id>";
+ }
+ }
InspectorTest.log('result: ' + JSON.stringify(msg.result, null, " "));
InspectorTest.completeTest();
@@ -49,6 +53,10 @@ function test()
</script>
</head>
<body onLoad="runTest();">
- <input type="text"></input>
+ <div role="main">
+ <div role="article" aria-label="Top story">
+ <input type="text"></input>
+ </div>
+ </div>
</body>
</html>

Powered by Google App Engine
This is Rietveld 408576698