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

Unified Diff: third_party/WebKit/LayoutTests/inspector-protocol/accessibility/accessibility-dumpAccessibilityNodes.js

Issue 2351443003: Revert of Show ancestor hierarchy in accessibility panel (Closed)
Patch Set: 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
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/inspector-protocol/accessibility/accessibility-getAXNode.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/inspector-protocol/accessibility/accessibility-dumpAccessibilityNodes.js
diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/accessibility/accessibility-dumpAccessibilityNodes.js b/third_party/WebKit/LayoutTests/inspector-protocol/accessibility/accessibility-dumpAccessibilityNodes.js
index 46d31fde737a6c5c52c0bbb0f94f6baf1b3fd0bd..ca63bbde4e97d0921bb08feb36837b24f69af730 100644
--- a/third_party/WebKit/LayoutTests/inspector-protocol/accessibility/accessibility-dumpAccessibilityNodes.js
+++ b/third_party/WebKit/LayoutTests/inspector-protocol/accessibility/accessibility-dumpAccessibilityNodes.js
@@ -54,9 +54,9 @@
var promise;
msg.result.nodeIds.forEach((id) => {
if (promise)
- promise = promise.then(() => { return sendCommandPromise("Accessibility.getAXNodeChain", { "nodeId": id, "fetchAncestors": false }); });
+ promise = promise.then(() => { return sendCommandPromise("Accessibility.getAXNode", { "nodeId": id }); });
else
- promise = sendCommandPromise("Accessibility.getAXNodeChain", { "nodeId": id, "fetchAncestors": false });
+ promise = sendCommandPromise("Accessibility.getAXNode", { "nodeId": id });
promise = promise.then((msg) => { return rewriteRelatedNodes(msg); })
.then((msg) => { return dumpNode(null, msg); });
});
@@ -109,23 +109,12 @@
var currentPath = [];
var currentObject = obj;
for (var component of pathComponents) {
- var isArray = false;
- var index = -1;
- var matches = component.match(/(\w+)\[(\d+)\]/);
- if (matches) {
- isArray = true;
- component = matches[1];
- index = Number.parseInt(matches[2], 10);
- }
currentPath.push(component);
if (!(component in currentObject)) {
- InspectorTest.log("Could not find " + currentPath.join(".") + " in " + JSON.stringify(obj, null, " "));
- InspectorTest.completeTest();
+ throw new Error("Could not find " + currentPath.join(".") + " in " + JSON.stringify(obj, null, " "));
+ return false;
}
- if (isArray)
- currentObject = currentObject[component][index];
- else
- currentObject = currentObject[component];
+ currentObject = currentObject[component];
}
return true;
}
@@ -153,13 +142,12 @@
throw new Error(msg.error.message);
}
- var node = msg.result.nodes[0];
-
+ var node = msg.result.accessibilityNode;
if (node.ignored) {
- checkExists("result.nodes[0].ignoredReasons", msg);
+ checkExists("result.accessibilityNode.ignoredReasons", msg);
var properties = node.ignoredReasons;
} else {
- checkExists("result.nodes[0].properties", msg);
+ checkExists("result.accessibilityNode.properties", msg);
var properties = node.properties;
}
var promises = [];
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/inspector-protocol/accessibility/accessibility-getAXNode.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698