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

Side by Side Diff: content/browser/accessibility/dump_accessibility_tree_helper_mac.mm

Issue 9835038: Add roleDescription to DumpAccessibilityTree for mac. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Rebaselined Created 8 years, 8 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | content/test/data/accessibility/aria-application-expected-mac.txt » ('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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "content/browser/accessibility/dump_accessibility_tree_helper.h" 5 #include "content/browser/accessibility/dump_accessibility_tree_helper.h"
6 6
7 #import <Cocoa/Cocoa.h> 7 #import <Cocoa/Cocoa.h>
8 8
9 #include "base/file_path.h" 9 #include "base/file_path.h"
10 #include "base/utf_string_conversions.h" 10 #include "base/utf_string_conversions.h"
11 #include "content/browser/accessibility/browser_accessibility_cocoa.h" 11 #include "content/browser/accessibility/browser_accessibility_cocoa.h"
12 #include "content/browser/accessibility/browser_accessibility_mac.h" 12 #include "content/browser/accessibility/browser_accessibility_mac.h"
13 13
14 void DumpAccessibilityTreeHelper::Initialize() {} 14 void DumpAccessibilityTreeHelper::Initialize() {}
15 15
16 string16 DumpAccessibilityTreeHelper::ToString(BrowserAccessibility* node, 16 string16 DumpAccessibilityTreeHelper::ToString(BrowserAccessibility* node,
17 char* prefix) { 17 char* prefix) {
18 BrowserAccessibilityCocoa* cocoa_node = node->toBrowserAccessibilityCocoa(); 18 BrowserAccessibilityCocoa* cocoa_node = node->toBrowserAccessibilityCocoa();
19 NSString* dump = 19 NSString* dump =
20 [NSString stringWithFormat:@"%s%@ subrole=%@ title='%@' value='%@'\n", 20 [NSString stringWithFormat:@"%s%@ "
21 "subrole=%@ "
22 "roleDescription='%@' "
23 "title='%@' "
24 "value='%@'\n",
21 prefix, 25 prefix,
22 [cocoa_node role], 26 [cocoa_node role],
23 [cocoa_node subrole], 27 [cocoa_node subrole],
28 [cocoa_node roleDescription],
24 [cocoa_node title], 29 [cocoa_node title],
25 [cocoa_node value]]; 30 [cocoa_node value]];
26 std::string tempVal = [dump cStringUsingEncoding:NSUTF8StringEncoding]; 31 std::string tempVal = [dump cStringUsingEncoding:NSUTF8StringEncoding];
27 32
28 return UTF8ToUTF16(tempVal); 33 return UTF8ToUTF16(tempVal);
29 } 34 }
30 35
31 const FilePath::StringType DumpAccessibilityTreeHelper::GetActualFileSuffix() 36 const FilePath::StringType DumpAccessibilityTreeHelper::GetActualFileSuffix()
32 const { 37 const {
33 return FILE_PATH_LITERAL("-actual-mac.txt"); 38 return FILE_PATH_LITERAL("-actual-mac.txt");
34 } 39 }
35 40
36 const FilePath::StringType DumpAccessibilityTreeHelper::GetExpectedFileSuffix() 41 const FilePath::StringType DumpAccessibilityTreeHelper::GetExpectedFileSuffix()
37 const { 42 const {
38 return FILE_PATH_LITERAL("-expected-mac.txt"); 43 return FILE_PATH_LITERAL("-expected-mac.txt");
39 } 44 }
OLDNEW
« no previous file with comments | « no previous file | content/test/data/accessibility/aria-application-expected-mac.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698