| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include <oleacc.h> | 5 #include <oleacc.h> |
| 6 | 6 |
| 7 #include "base/utf_string_conversions.h" | 7 #include "base/utf_string_conversions.h" |
| 8 #include "base/win/scoped_comptr.h" | 8 #include "base/win/scoped_comptr.h" |
| 9 #include "chrome/browser/ui/browser.h" | 9 #include "chrome/browser/ui/browser.h" |
| 10 #include "chrome/browser/ui/browser_window.h" | 10 #include "chrome/browser/ui/browser_window.h" |
| (...skipping 238 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 249 } | 249 } |
| 250 | 250 |
| 251 // http://crbug.com/104132 | 251 // http://crbug.com/104132 |
| 252 IN_PROC_BROWSER_TEST_F(BrowserViewsAccessibilityTest, | 252 IN_PROC_BROWSER_TEST_F(BrowserViewsAccessibilityTest, |
| 253 DISABLED_TestBookmarkBarViewAccObj) { | 253 DISABLED_TestBookmarkBarViewAccObj) { |
| 254 TestViewAccessibilityObject( | 254 TestViewAccessibilityObject( |
| 255 GetBookmarkBarView(), | 255 GetBookmarkBarView(), |
| 256 UTF16ToWide(l10n_util::GetStringUTF16(IDS_ACCNAME_BOOKMARKS)), | 256 UTF16ToWide(l10n_util::GetStringUTF16(IDS_ACCNAME_BOOKMARKS)), |
| 257 ROLE_SYSTEM_TOOLBAR); | 257 ROLE_SYSTEM_TOOLBAR); |
| 258 } | 258 } |
| 259 | |
| 260 // http://crbug.com/114111 | |
| 261 IN_PROC_BROWSER_TEST_F(BrowserViewsAccessibilityTest, | |
| 262 DISABLED_TestAboutChromeViewAccObj) { | |
| 263 // Firstly, test that the WindowDelegate got updated. | |
| 264 views::Widget* about_chrome_window = | |
| 265 GetBrowserView()->DoShowAboutChromeDialog(); | |
| 266 EXPECT_STREQ( | |
| 267 about_chrome_window->widget_delegate()->GetWindowTitle().c_str(), | |
| 268 UTF16ToWide(l10n_util::GetStringUTF16(IDS_ABOUT_CHROME_TITLE)).c_str()); | |
| 269 EXPECT_EQ(about_chrome_window->widget_delegate()->GetAccessibleWindowRole(), | |
| 270 ui::AccessibilityTypes::ROLE_DIALOG); | |
| 271 | |
| 272 // Also test the accessibility object directly. | |
| 273 IAccessible* acc_obj = NULL; | |
| 274 HRESULT hr = | |
| 275 ::AccessibleObjectFromWindow(about_chrome_window->GetNativeWindow(), | |
| 276 OBJID_CLIENT, | |
| 277 IID_IAccessible, | |
| 278 reinterpret_cast<void**>(&acc_obj)); | |
| 279 ASSERT_EQ(S_OK, hr); | |
| 280 ASSERT_TRUE(NULL != acc_obj); | |
| 281 | |
| 282 TestAccessibilityInfo( | |
| 283 acc_obj, | |
| 284 UTF16ToWide(l10n_util::GetStringUTF16(IDS_ABOUT_CHROME_TITLE)), | |
| 285 ROLE_SYSTEM_DIALOG); | |
| 286 | |
| 287 acc_obj->Release(); | |
| 288 } | |
| OLD | NEW |