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

Unified Diff: content/test/accessibility_browser_test_utils.cc

Issue 21269002: Make AccessibilityNodeData more compact. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix win test Created 7 years, 4 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/renderer/accessibility/renderer_accessibility_complete.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/test/accessibility_browser_test_utils.cc
diff --git a/content/test/accessibility_browser_test_utils.cc b/content/test/accessibility_browser_test_utils.cc
index 5ca6b12ef77b6e8608662d935b066c35d6e52183..b8513fd72ce257a614818c262f25edb6a50e3ad4 100644
--- a/content/test/accessibility_browser_test_utils.cc
+++ b/content/test/accessibility_browser_test_utils.cc
@@ -57,13 +57,11 @@ bool AccessibilityNotificationWaiter::IsAboutBlank() {
// to avoid a possible race condition between the test beginning
// listening for accessibility events and "about:blank" loading.
const AccessibilityNodeDataTreeNode& root = GetAccessibilityNodeDataTree();
- typedef AccessibilityNodeData::StringAttribute StringAttribute;
- std::map<StringAttribute, string16>::const_iterator iter;
- iter = root.string_attributes.find(AccessibilityNodeData::ATTR_DOC_URL);
- if (iter != root.string_attributes.end()) {
- string16 doc_url = iter->second;
- if (doc_url == ASCIIToUTF16(kAboutBlankURL))
- return true;
+ for (size_t i = 0; i < root.string_attributes.size(); ++i) {
+ if (root.string_attributes[i].first != AccessibilityNodeData::ATTR_DOC_URL)
+ continue;
+ const std::string& doc_url = root.string_attributes[i].second;
+ return doc_url == kAboutBlankURL;
}
return false;
}
« no previous file with comments | « content/renderer/accessibility/renderer_accessibility_complete.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698