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

Unified Diff: chrome/browser/ui/views/accessibility/accessibility_event_router_views_unittest.cc

Issue 414203002: Modified tab change to work with status tray change (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: nit fix Created 6 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 | « chrome/browser/ui/views/accessibility/accessibility_event_router_views.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/accessibility/accessibility_event_router_views_unittest.cc
diff --git a/chrome/browser/ui/views/accessibility/accessibility_event_router_views_unittest.cc b/chrome/browser/ui/views/accessibility/accessibility_event_router_views_unittest.cc
index f1bc32e5a2f69a619317fa54158d8832595e238c..aa05ab18cb4b82ec85260dbf6f4bdc92d0376e05 100644
--- a/chrome/browser/ui/views/accessibility/accessibility_event_router_views_unittest.cc
+++ b/chrome/browser/ui/views/accessibility/accessibility_event_router_views_unittest.cc
@@ -424,6 +424,32 @@ TEST_F(AccessibilityEventRouterViewsTest, AlertsFromWindowAndControl) {
window->CloseNow();
}
+TEST_F(AccessibilityEventRouterViewsTest, AccessibilityFocusableView) {
+ // Create a view with a child view.
+ views::View* parent = new views::View();
+ views::View* child = new views::View();
+ parent->AddChildView(child);
+
+ // Put the view in a window.
+ views::Widget* window = CreateWindowWithContents(parent);
+
+ // Since the child view has no accessiblity focusable ancestors, this
+ // should still be the child view.
+ views::View* accessible_view =
+ AccessibilityEventRouterViews::FindFirstAccessibleAncestor(child);
+ EXPECT_EQ(accessible_view, child);
+
+ // Now make the parent view accessiblity focusable. Calling
+ // FindFirstAccessibleAncestor() again on child shoudl return the parent
+ // view.
+ parent->SetAccessibilityFocusable(true);
+ accessible_view =
+ AccessibilityEventRouterViews::FindFirstAccessibleAncestor(child);
+ EXPECT_EQ(accessible_view, parent);
+
+ window->CloseNow();
+}
+
namespace {
class SimpleMenuDelegate : public ui::SimpleMenuModel::Delegate {
« no previous file with comments | « chrome/browser/ui/views/accessibility/accessibility_event_router_views.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698