OLD | NEW |
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 Loading... |
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 Loading... |
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 }; |
OLD | NEW |