| 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/strings/utf_string_conversions.h" | 7 #include "base/strings/utf_string_conversions.h" |
| 8 #include "base/win/scoped_bstr.h" | 8 #include "base/win/scoped_bstr.h" |
| 9 #include "base/win/scoped_com_initializer.h" | 9 #include "base/win/scoped_com_initializer.h" |
| 10 #include "base/win/scoped_comptr.h" | 10 #include "base/win/scoped_comptr.h" |
| (...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 122 HWND hwnd = browser_window->GetNativeWindow(); | 122 HWND hwnd = browser_window->GetNativeWindow(); |
| 123 ASSERT_TRUE(NULL != hwnd); | 123 ASSERT_TRUE(NULL != hwnd); |
| 124 | 124 |
| 125 // Get accessibility object. | 125 // Get accessibility object. |
| 126 base::win::ScopedComPtr<IAccessible> acc_obj; | 126 base::win::ScopedComPtr<IAccessible> acc_obj; |
| 127 HRESULT hr = ::AccessibleObjectFromWindow(hwnd, OBJID_WINDOW, IID_IAccessible, | 127 HRESULT hr = ::AccessibleObjectFromWindow(hwnd, OBJID_WINDOW, IID_IAccessible, |
| 128 reinterpret_cast<void**>(&acc_obj)); | 128 reinterpret_cast<void**>(&acc_obj)); |
| 129 ASSERT_EQ(S_OK, hr); | 129 ASSERT_EQ(S_OK, hr); |
| 130 ASSERT_TRUE(NULL != acc_obj); | 130 ASSERT_TRUE(NULL != acc_obj); |
| 131 | 131 |
| 132 ui_test_utils::NavigateToURL(browser(), GURL(content::kAboutBlankURL)); | 132 ui_test_utils::NavigateToURL(browser(), GURL(url::kAboutBlankURL)); |
| 133 std::wstring title = UTF16ToWide(l10n_util::GetStringFUTF16( | 133 std::wstring title = UTF16ToWide(l10n_util::GetStringFUTF16( |
| 134 IDS_BROWSER_WINDOW_TITLE_FORMAT, | 134 IDS_BROWSER_WINDOW_TITLE_FORMAT, |
| 135 base::ASCIIToUTF16(content::kAboutBlankURL))); | 135 base::ASCIIToUTF16(url::kAboutBlankURL))); |
| 136 TestAccessibilityInfo(acc_obj, title, ROLE_SYSTEM_WINDOW); | 136 TestAccessibilityInfo(acc_obj, title, ROLE_SYSTEM_WINDOW); |
| 137 } | 137 } |
| 138 | 138 |
| 139 // Retrieve accessibility object for non client view and verify accessibility | 139 // Retrieve accessibility object for non client view and verify accessibility |
| 140 // info. | 140 // info. |
| 141 // TODO(pkasting): Disabled pending resolution of whether this should be | 141 // TODO(pkasting): Disabled pending resolution of whether this should be |
| 142 // ROLE_SYSTEM_CLIENT or ROLE_SYSTEM_WINDOW. | 142 // ROLE_SYSTEM_CLIENT or ROLE_SYSTEM_WINDOW. |
| 143 IN_PROC_BROWSER_TEST_F(BrowserViewsAccessibilityTest, | 143 IN_PROC_BROWSER_TEST_F(BrowserViewsAccessibilityTest, |
| 144 DISABLED_TestNonClientViewAccObj) { | 144 DISABLED_TestNonClientViewAccObj) { |
| 145 TestViewAccessibilityObject( | 145 TestViewAccessibilityObject( |
| (...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 242 } | 242 } |
| 243 | 243 |
| 244 // Retrieve accessibility object for bookmark bar and verify accessibility info. | 244 // Retrieve accessibility object for bookmark bar and verify accessibility info. |
| 245 IN_PROC_BROWSER_TEST_F(BrowserViewsAccessibilityTest, | 245 IN_PROC_BROWSER_TEST_F(BrowserViewsAccessibilityTest, |
| 246 TestBookmarkBarViewAccObj) { | 246 TestBookmarkBarViewAccObj) { |
| 247 TestViewAccessibilityObject( | 247 TestViewAccessibilityObject( |
| 248 GetBookmarkBarView(), | 248 GetBookmarkBarView(), |
| 249 UTF16ToWide(l10n_util::GetStringUTF16(IDS_ACCNAME_BOOKMARKS)), | 249 UTF16ToWide(l10n_util::GetStringUTF16(IDS_ACCNAME_BOOKMARKS)), |
| 250 ROLE_SYSTEM_TOOLBAR); | 250 ROLE_SYSTEM_TOOLBAR); |
| 251 } | 251 } |
| OLD | NEW |