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

Side by Side Diff: chrome/browser/accessibility/accessibility_win_browsertest.cc

Issue 12314090: Add utf_string_conversions to base namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 10 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
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 <atlbase.h> 5 #include <atlbase.h>
6 #include <vector> 6 #include <vector>
7 7
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "base/stringprintf.h" 9 #include "base/stringprintf.h"
10 #include "base/utf_string_conversions.h" 10 #include "base/utf_string_conversions.h"
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after
169 node->get_accName(CreateI4Variant(CHILDID_SELF), &name_bstr); 169 node->get_accName(CreateI4Variant(CHILDID_SELF), &name_bstr);
170 wstring name(name_bstr.m_str, SysStringLen(name_bstr)); 170 wstring name(name_bstr.m_str, SysStringLen(name_bstr));
171 VARIANT role = {0}; 171 VARIANT role = {0};
172 node->get_accRole(CreateI4Variant(CHILDID_SELF), &role); 172 node->get_accRole(CreateI4Variant(CHILDID_SELF), &role);
173 173
174 // Print the accessibility tree as we go, because if this test fails 174 // Print the accessibility tree as we go, because if this test fails
175 // on the bots, this is really helpful in figuring out why. 175 // on the bots, this is really helpful in figuring out why.
176 for (int i = 0; i < depth; i++) { 176 for (int i = 0; i < depth; i++) {
177 printf(" "); 177 printf(" ");
178 } 178 }
179 printf("role=%d name=%s\n", role.lVal, WideToUTF8(name).c_str()); 179 printf("role=%d name=%s\n", role.lVal, base::WideToUTF8(name).c_str());
180 180
181 if (expected_role == role.lVal && expected_name == name) { 181 if (expected_role == role.lVal && expected_name == name) {
182 *found = true; 182 *found = true;
183 return; 183 return;
184 } 184 }
185 185
186 LONG child_count = 0; 186 LONG child_count = 0;
187 HRESULT hr = node->get_accChildCount(&child_count); 187 HRESULT hr = node->get_accChildCount(&child_count);
188 ASSERT_EQ(S_OK, hr); 188 ASSERT_EQ(S_OK, hr);
189 189
(...skipping 644 matching lines...) Expand 10 before | Expand all | Expand 10 after
834 834
835 // Check the browser's copy of the renderer accessibility tree. 835 // Check the browser's copy of the renderer accessibility tree.
836 AccessibleChecker grouping1_checker(L"", ROLE_SYSTEM_GROUPING, L""); 836 AccessibleChecker grouping1_checker(L"", ROLE_SYSTEM_GROUPING, L"");
837 AccessibleChecker grouping2_checker(L"", ROLE_SYSTEM_GROUPING, L""); 837 AccessibleChecker grouping2_checker(L"", ROLE_SYSTEM_GROUPING, L"");
838 AccessibleChecker document_checker(L"", ROLE_SYSTEM_DOCUMENT, L""); 838 AccessibleChecker document_checker(L"", ROLE_SYSTEM_DOCUMENT, L"");
839 document_checker.AppendExpectedChild(&grouping1_checker); 839 document_checker.AppendExpectedChild(&grouping1_checker);
840 document_checker.AppendExpectedChild(&grouping2_checker); 840 document_checker.AppendExpectedChild(&grouping2_checker);
841 document_checker.CheckAccessible(GetRendererAccessible()); 841 document_checker.CheckAccessible(GetRendererAccessible());
842 } 842 }
843 } // namespace. 843 } // namespace.
OLDNEW
« no previous file with comments | « chrome/browser/about_flags_unittest.cc ('k') | chrome/browser/autocomplete/autocomplete_input_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698