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

Unified Diff: content/test/accessibility_test_utils_win.cc

Issue 10837065: Revert 149510 - Allow filters in accessibility tests to specify which attributes to check. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/public/test/accessibility_test_utils_win.h ('k') | content/test/data/accessibility/a.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/test/accessibility_test_utils_win.cc
===================================================================
--- content/test/accessibility_test_utils_win.cc (revision 149548)
+++ content/test/accessibility_test_utils_win.cc (working copy)
@@ -230,36 +230,38 @@
return AccessibilityRoleStateMap::GetInstance()->ia2_role_string_map[ia_role];
}
-void IAccessibleStateToStringVector(int32 ia_state,
- std::vector<string16>* result) {
+string16 IAccessibleStateToString(int32 ia_state) {
+ string16 state_str;
const std::map<int32, string16>& state_string_map =
AccessibilityRoleStateMap::GetInstance()->ia_state_string_map;
std::map<int32, string16>::const_iterator it;
- for (it = state_string_map.begin(); it != state_string_map.end(); ++it) {
- if (it->first & ia_state)
- result->push_back(it->second);
+
+ for (it = state_string_map.begin();
+ it != state_string_map.end();
+ ++it) {
+ if (it->first & ia_state) {
+ if (!state_str.empty())
+ state_str += L",";
+ state_str += it->second;
+ }
}
+ return state_str;
}
-string16 IAccessibleStateToString(int32 ia_state) {
- std::vector<string16> strings;
- IAccessibleStateToStringVector(ia_state, &strings);
- return JoinString(strings, ',');
-}
-
-void IAccessible2StateToStringVector(int32 ia2_state,
- std::vector<string16>* result) {
+string16 IAccessible2StateToString(int32 ia2_state) {
+ string16 state_str;
const std::map<int32, string16>& state_string_map =
AccessibilityRoleStateMap::GetInstance()->ia2_state_string_map;
std::map<int32, string16>::const_iterator it;
- for (it = state_string_map.begin(); it != state_string_map.end(); ++it) {
- if (it->first & ia2_state)
- result->push_back(it->second);
+
+ for (it = state_string_map.begin();
+ it != state_string_map.end();
+ ++it) {
+ if (it->first & ia2_state) {
+ if (!state_str.empty())
+ state_str += L",";
+ state_str += it->second;
+ }
}
+ return state_str;
}
-
-string16 IAccessible2StateToString(int32 ia2_state) {
- std::vector<string16> strings;
- IAccessible2StateToStringVector(ia2_state, &strings);
- return JoinString(strings, ',');
-}
« no previous file with comments | « content/public/test/accessibility_test_utils_win.h ('k') | content/test/data/accessibility/a.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698