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

Unified Diff: ui/views/widget/native_widget_mac_unittest.mm

Issue 2016243002: Mac a11y: Add RoleDescription and Value attributes to accessibility information. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: TODO for comparing against Cocoa. Created 4 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: ui/views/widget/native_widget_mac_unittest.mm
diff --git a/ui/views/widget/native_widget_mac_unittest.mm b/ui/views/widget/native_widget_mac_unittest.mm
index 511a507bab50b1c701ebbd5da5be933a2e20240c..e1c4e58ea0839b0462073ba88b6cbb4a72d250ad 100644
--- a/ui/views/widget/native_widget_mac_unittest.mm
+++ b/ui/views/widget/native_widget_mac_unittest.mm
@@ -561,30 +561,6 @@ TEST_F(NativeWidgetMacTest, SetCursor) {
widget->CloseNow();
}
-// Tests that an accessibility request from the system makes its way through to
-// a views::Label filling the window.
-TEST_F(NativeWidgetMacTest, AccessibilityIntegration) {
- Widget* widget = CreateTopLevelPlatformWidget();
- gfx::Rect screen_rect(50, 50, 100, 100);
- widget->SetBounds(screen_rect);
-
- const base::string16 test_string = base::ASCIIToUTF16("Green");
- views::Label* label = new views::Label(test_string);
- label->SetBounds(0, 0, 100, 100);
- widget->GetContentsView()->AddChildView(label);
- widget->Show();
-
- // Accessibility hit tests come in Cocoa screen coordinates.
- NSRect nsrect = gfx::ScreenRectToNSRect(screen_rect);
- NSPoint midpoint = NSMakePoint(NSMidX(nsrect), NSMidY(nsrect));
-
- id hit = [widget->GetNativeWindow() accessibilityHitTest:midpoint];
- id title = [hit accessibilityAttributeValue:NSAccessibilityTitleAttribute];
- EXPECT_NSEQ(title, @"Green");
-
- widget->CloseNow();
-}
-
// Tests creating a views::Widget parented off a native NSWindow.
TEST_F(NativeWidgetMacTest, NonWidgetParent) {
NSWindow* native_parent = MakeNativeParent();

Powered by Google App Engine
This is Rietveld 408576698