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

Side by Side Diff: third_party/WebKit/LayoutTests/inspector/elements/accessibility/accessibility-pane-test.js

Issue 2436703003: DevTools: Flesh out AccessibilityModel and use SDK objects instead of protocol objects (Closed)
Patch Set: Update edit-aria-attributes to operate on SDK object Created 4 years, 2 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 unified diff | Download patch
« no previous file with comments | « no previous file | third_party/WebKit/Source/devtools/front_end/accessibility/ARIAAttributesView.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 var initialize_AccessibilityTest = function() { 1 var initialize_AccessibilityTest = function() {
2 2
3 InspectorTest.accessibilitySidebarPane = function() 3 InspectorTest.accessibilitySidebarPane = function()
4 { 4 {
5 return self.runtime.sharedInstance(WebInspector.AccessibilitySidebarView); 5 return self.runtime.sharedInstance(WebInspector.AccessibilitySidebarView);
6 } 6 }
7 7
8 /** 8 /**
9 * @param {string} idValue 9 * @param {string} idValue
10 * @return {Promise} 10 * @return {Promise}
(...skipping 13 matching lines...) Expand all
24 24
25 if (!sidebarPane) { 25 if (!sidebarPane) {
26 InspectorTest.addResult("No sidebarPane in dumpSelectedElementAccessibil ityNode"); 26 InspectorTest.addResult("No sidebarPane in dumpSelectedElementAccessibil ityNode");
27 InspectorTest.completeTest(); 27 InspectorTest.completeTest();
28 return; 28 return;
29 } 29 }
30 InspectorTest.dumpAccessibilityNode(sidebarPane._axNodeSubPane._axNode); 30 InspectorTest.dumpAccessibilityNode(sidebarPane._axNodeSubPane._axNode);
31 } 31 }
32 32
33 /** 33 /**
34 * @param {!AccessibilityAgent.AXNode} accessibilityNode 34 * @param {!WebInspector.AccessibilityNode} accessibilityNode
35 */ 35 */
36 InspectorTest.dumpAccessibilityNode = function(accessibilityNode) 36 InspectorTest.dumpAccessibilityNode = function(accessibilityNode)
37 { 37 {
38 if (!accessibilityNode) { 38 if (!accessibilityNode) {
39 InspectorTest.addResult("<null>"); 39 InspectorTest.addResult("<null>");
40 InspectorTest.completeTest(); 40 InspectorTest.completeTest();
41 return; 41 return;
42 } 42 }
43 43
44 var builder = []; 44 var builder = [];
45 builder.push(accessibilityNode.role.value); 45 builder.push(accessibilityNode.role().value);
46 builder.push(accessibilityNode.name ? '"' + accessibilityNode.name.value + ' "' 46 builder.push(accessibilityNode.name() ? '"' + accessibilityNode.name().value + '"'
47 : "<undefined>"); 47 : "<undefined>");
48 if ("properties" in accessibilityNode) { 48 if (accessibilityNode.properties()) {
49 for (var property of accessibilityNode.properties) { 49 for (var property of accessibilityNode.properties()) {
50 if ("value" in property) 50 if ("value" in property)
51 builder.push(property.name + '="' + property.value.value + '"'); 51 builder.push(property.name + '="' + property.value.value + '"');
52 } 52 }
53 } 53 }
54 InspectorTest.addResult(builder.join(" ")); 54 InspectorTest.addResult(builder.join(" "));
55 } 55 }
56 56
57 /** 57 /**
58 * @param {string} attribute 58 * @param {string} attribute
59 * @return {?WebInspector.ARIAAttributesTreeElement} 59 * @return {?WebInspector.ARIAAttributesTreeElement}
(...skipping 12 matching lines...) Expand all
72 var treeOutline = ariaSubPane._treeOutline; 72 var treeOutline = ariaSubPane._treeOutline;
73 var childNodes = treeOutline._rootElement._children; 73 var childNodes = treeOutline._rootElement._children;
74 for (var treeElement of childNodes) { 74 for (var treeElement of childNodes) {
75 if (treeElement._attribute.name === attribute) 75 if (treeElement._attribute.name === attribute)
76 return treeElement; 76 return treeElement;
77 } 77 }
78 return null; 78 return null;
79 } 79 }
80 80
81 }; 81 };
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/devtools/front_end/accessibility/ARIAAttributesView.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698