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

Side by Side Diff: chrome/browser/ui/views/accessibility/browser_views_accessibility_browsertest.cc

Issue 10538039: Renamed BrowserWindow::GetNativeHandle() to GetNativeWindow() (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Update copyrights Created 8 years, 6 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 ::SysFreeString(acc_name); 107 ::SysFreeString(acc_name);
108 } 108 }
109 }; 109 };
110 110
111 // Retrieve accessibility object for main window and verify accessibility info. 111 // Retrieve accessibility object for main window and verify accessibility info.
112 IN_PROC_BROWSER_TEST_F(BrowserViewsAccessibilityTest, 112 IN_PROC_BROWSER_TEST_F(BrowserViewsAccessibilityTest,
113 TestChromeWindowAccObj) { 113 TestChromeWindowAccObj) {
114 BrowserWindow* browser_window = browser()->window(); 114 BrowserWindow* browser_window = browser()->window();
115 ASSERT_TRUE(NULL != browser_window); 115 ASSERT_TRUE(NULL != browser_window);
116 116
117 HWND hwnd = browser_window->GetNativeHandle(); 117 HWND hwnd = browser_window->GetNativeWindow();
118 ASSERT_TRUE(NULL != hwnd); 118 ASSERT_TRUE(NULL != hwnd);
119 119
120 // Get accessibility object. 120 // Get accessibility object.
121 base::win::ScopedComPtr<IAccessible> acc_obj; 121 base::win::ScopedComPtr<IAccessible> acc_obj;
122 HRESULT hr = ::AccessibleObjectFromWindow(hwnd, OBJID_WINDOW, IID_IAccessible, 122 HRESULT hr = ::AccessibleObjectFromWindow(hwnd, OBJID_WINDOW, IID_IAccessible,
123 reinterpret_cast<void**>(&acc_obj)); 123 reinterpret_cast<void**>(&acc_obj));
124 ASSERT_EQ(S_OK, hr); 124 ASSERT_EQ(S_OK, hr);
125 ASSERT_TRUE(NULL != acc_obj); 125 ASSERT_TRUE(NULL != acc_obj);
126 126
127 ui_test_utils::NavigateToURL(browser(), GURL(chrome::kAboutBlankURL)); 127 ui_test_utils::NavigateToURL(browser(), GURL(chrome::kAboutBlankURL));
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after
279 ASSERT_EQ(S_OK, hr); 279 ASSERT_EQ(S_OK, hr);
280 ASSERT_TRUE(NULL != acc_obj); 280 ASSERT_TRUE(NULL != acc_obj);
281 281
282 TestAccessibilityInfo( 282 TestAccessibilityInfo(
283 acc_obj, 283 acc_obj,
284 UTF16ToWide(l10n_util::GetStringUTF16(IDS_ABOUT_CHROME_TITLE)), 284 UTF16ToWide(l10n_util::GetStringUTF16(IDS_ABOUT_CHROME_TITLE)),
285 ROLE_SYSTEM_DIALOG); 285 ROLE_SYSTEM_DIALOG);
286 286
287 acc_obj->Release(); 287 acc_obj->Release();
288 } 288 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698