Chromium Code Reviews| Index: content/browser/accessibility/dump_accessibility_tree_helper_win.cc |
| diff --git a/content/browser/accessibility/dump_accessibility_tree_helper_win.cc b/content/browser/accessibility/dump_accessibility_tree_helper_win.cc |
| index 33dac19aacf697a79a3ea6a203b96803f678eeb7..6cfea740bc708ed2864ea19b69ba26b4271a8726 100644 |
| --- a/content/browser/accessibility/dump_accessibility_tree_helper_win.cc |
| +++ b/content/browser/accessibility/dump_accessibility_tree_helper_win.cc |
| @@ -155,7 +155,8 @@ void DumpAccessibilityTreeHelper::Initialize() { |
| // STATE_MAP(IA2_STATE_VERTICAL) // Untested. |
| } |
| -string16 DumpAccessibilityTreeHelper::ToString(BrowserAccessibility* node) { |
| +string16 DumpAccessibilityTreeHelper::ToString( |
| + BrowserAccessibility* node, char* prefix) { |
| if (role_string_map.empty()) |
| Initialize(); |
| @@ -164,11 +165,16 @@ string16 DumpAccessibilityTreeHelper::ToString(BrowserAccessibility* node) { |
| std::map<int32, string16>::iterator it; |
| for (it = state_string_map.begin(); it != state_string_map.end(); ++it) { |
| - if (it->first & acc_obj->ia2_state()) |
| - state += it->second + L"|"; |
| + if (it->first & acc_obj->ia2_state()) { |
| + if (!state.empty()) |
| + state += L","; |
| + state += it->second; |
| + } |
| } |
| - return acc_obj->name() + L"|" + role_string_map[acc_obj->ia2_role()] + L"|" + |
| - state; |
| + return UTF8ToUTF16(prefix) + |
| + role_string_map[acc_obj->ia2_role()] + |
| + L" name='" + acc_obj->name() + L"'" + |
| + L" state=" + state; |
| } |
| const FilePath::StringType DumpAccessibilityTreeHelper::GetActualFileSuffix() |
| @@ -180,7 +186,3 @@ const FilePath::StringType DumpAccessibilityTreeHelper::GetExpectedFileSuffix() |
| const { |
| return FILE_PATH_LITERAL("-expected-win.txt"); |
| } |
| - |
| -const string16 DumpAccessibilityTreeHelper::GetLineEnding() const { |
|
David Tseng
2012/03/06 23:49:05
I don't seem to see the browsertest file? Put this
dmazzoni
2012/03/08 07:10:37
It's handled directly in ToString now - the platfo
|
| - return L"\r\n"; |
| -} |