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

Unified Diff: content/public/test/browser_test_utils.cc

Issue 2860883003: A11y: Add/refactor methods for manipulating bitfields on AXNodeData. (Closed)
Patch Set: Revert comment. Created 3 years, 7 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
Index: content/public/test/browser_test_utils.cc
diff --git a/content/public/test/browser_test_utils.cc b/content/public/test/browser_test_utils.cc
index 0864b5a2ae4d89bf797a839f21ec40f8e937e24a..17a19d42a885ce52a1a4acb4130b0a11b85057e4 100644
--- a/content/public/test/browser_test_utils.cc
+++ b/content/public/test/browser_test_utils.cc
@@ -1119,8 +1119,11 @@ ui::AXNodeData GetFocusedAccessibilityNodeInfo(WebContents* web_contents) {
static_cast<WebContentsImpl*>(web_contents);
BrowserAccessibilityManager* manager =
web_contents_impl->GetRootBrowserAccessibilityManager();
- if (!manager)
- return ui::AXNodeData();
+ if (!manager) {
+ ui::AXNodeData data = ui::AXNodeData();
tapted 2017/05/05 05:53:36 nit: = `ui::AXNodeData();` not required
Patti Lor 2017/05/08 00:28:08 Oops, thanks.
+ data.ClearBitfields();
+ return data;
+ }
BrowserAccessibility* focused_node = manager->GetFocus();
return focused_node->GetData();
}

Powered by Google App Engine
This is Rietveld 408576698