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

Side by Side Diff: content/browser/accessibility/accessibility_tree_formatter_blink.cc

Issue 1552683002: Enable DumpAccessibilityTree tests to use cross-process iframes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebaseline last Android test Created 4 years, 11 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 | content/browser/accessibility/accessibility_tree_formatter_mac.mm » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2015 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include <stddef.h> 5 #include <stddef.h>
6 6
7 #include "base/strings/string_number_conversions.h" 7 #include "base/strings/string_number_conversions.h"
8 #include "base/strings/stringprintf.h" 8 #include "base/strings/stringprintf.h"
9 #include "content/browser/accessibility/accessibility_tree_formatter_blink.h" 9 #include "content/browser/accessibility/accessibility_tree_formatter_blink.h"
10 10
11 namespace content { 11 namespace content {
12 12
13 AccessibilityTreeFormatterBlink::AccessibilityTreeFormatterBlink() 13 AccessibilityTreeFormatterBlink::AccessibilityTreeFormatterBlink()
14 : AccessibilityTreeFormatter() { 14 : AccessibilityTreeFormatter() {
15 } 15 }
16 16
17 AccessibilityTreeFormatterBlink::~AccessibilityTreeFormatterBlink() { 17 AccessibilityTreeFormatterBlink::~AccessibilityTreeFormatterBlink() {
18 } 18 }
19 19
20 uint32_t AccessibilityTreeFormatterBlink::ChildCount( 20 uint32_t AccessibilityTreeFormatterBlink::ChildCount(
21 const BrowserAccessibility& node) const { 21 const BrowserAccessibility& node) const {
22 return node.InternalChildCount(); 22 if (node.HasIntAttribute(ui::AX_ATTR_CHILD_TREE_ID))
23 return node.PlatformChildCount();
24 else
25 return node.InternalChildCount();
23 } 26 }
24 27
25 BrowserAccessibility* AccessibilityTreeFormatterBlink::GetChild( 28 BrowserAccessibility* AccessibilityTreeFormatterBlink::GetChild(
26 const BrowserAccessibility& node, 29 const BrowserAccessibility& node,
27 uint32_t i) const { 30 uint32_t i) const {
28 return node.InternalGetChild(i); 31 if (node.HasIntAttribute(ui::AX_ATTR_CHILD_TREE_ID))
32 return node.PlatformGetChild(i);
33 else
34 return node.InternalGetChild(i);
29 } 35 }
30 36
31 void AccessibilityTreeFormatterBlink::AddProperties( 37 void AccessibilityTreeFormatterBlink::AddProperties(
32 const BrowserAccessibility& node, 38 const BrowserAccessibility& node,
33 base::DictionaryValue* dict) { 39 base::DictionaryValue* dict) {
34 dict->SetInteger("id", node.GetId()); 40 dict->SetInteger("id", node.GetId());
35 41
36 dict->SetString("role", ui::ToString(node.GetData().role)); 42 dict->SetString("role", ui::ToString(node.GetData().role));
37 43
38 dict->SetInteger("boundsX", node.GetData().location.x()); 44 dict->SetInteger("boundsX", node.GetData().location.x());
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after
204 210
205 const std::string AccessibilityTreeFormatterBlink::GetAllowString() { 211 const std::string AccessibilityTreeFormatterBlink::GetAllowString() {
206 return "@BLINK-ALLOW:"; 212 return "@BLINK-ALLOW:";
207 } 213 }
208 214
209 const std::string AccessibilityTreeFormatterBlink::GetDenyString() { 215 const std::string AccessibilityTreeFormatterBlink::GetDenyString() {
210 return "@BLINK-DENY:"; 216 return "@BLINK-DENY:";
211 } 217 }
212 218
213 } // namespace content 219 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | content/browser/accessibility/accessibility_tree_formatter_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698