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

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

Issue 6825055: Include base/win/scoped_comptr.h instead of base/scoped_comptr_win.h. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: revert bad indentation, rebase Created 9 years, 8 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/scoped_comptr_win.h"
8 #include "base/utf_string_conversions.h" 7 #include "base/utf_string_conversions.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"
11 #include "chrome/browser/ui/view_ids.h" 11 #include "chrome/browser/ui/view_ids.h"
12 #include "chrome/browser/ui/views/bookmarks/bookmark_bar_view.h" 12 #include "chrome/browser/ui/views/bookmarks/bookmark_bar_view.h"
13 #include "chrome/browser/ui/views/frame/browser_view.h" 13 #include "chrome/browser/ui/views/frame/browser_view.h"
14 #include "chrome/browser/ui/views/toolbar_view.h" 14 #include "chrome/browser/ui/views/toolbar_view.h"
15 #include "chrome/common/url_constants.h" 15 #include "chrome/common/url_constants.h"
16 #include "chrome/test/in_process_browser_test.h" 16 #include "chrome/test/in_process_browser_test.h"
17 #include "chrome/test/ui_test_utils.h" 17 #include "chrome/test/ui_test_utils.h"
18 #include "grit/chromium_strings.h" 18 #include "grit/chromium_strings.h"
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
120 // Retrieve accessibility object for main window and verify accessibility info. 120 // Retrieve accessibility object for main window and verify accessibility info.
121 IN_PROC_BROWSER_TEST_F(BrowserViewsAccessibilityTest, 121 IN_PROC_BROWSER_TEST_F(BrowserViewsAccessibilityTest,
122 TestChromeWindowAccObj) { 122 TestChromeWindowAccObj) {
123 BrowserWindow* browser_window = browser()->window(); 123 BrowserWindow* browser_window = browser()->window();
124 ASSERT_TRUE(NULL != browser_window); 124 ASSERT_TRUE(NULL != browser_window);
125 125
126 HWND hwnd = browser_window->GetNativeHandle(); 126 HWND hwnd = browser_window->GetNativeHandle();
127 ASSERT_TRUE(NULL != hwnd); 127 ASSERT_TRUE(NULL != hwnd);
128 128
129 // Get accessibility object. 129 // Get accessibility object.
130 ScopedComPtr<IAccessible> acc_obj; 130 base::win::ScopedComPtr<IAccessible> acc_obj;
131 HRESULT hr = ::AccessibleObjectFromWindow(hwnd, OBJID_WINDOW, IID_IAccessible, 131 HRESULT hr = ::AccessibleObjectFromWindow(hwnd, OBJID_WINDOW, IID_IAccessible,
132 reinterpret_cast<void**>(&acc_obj)); 132 reinterpret_cast<void**>(&acc_obj));
133 ASSERT_EQ(S_OK, hr); 133 ASSERT_EQ(S_OK, hr);
134 ASSERT_TRUE(NULL != acc_obj); 134 ASSERT_TRUE(NULL != acc_obj);
135 135
136 ui_test_utils::NavigateToURL(browser(), GURL(chrome::kAboutBlankURL)); 136 ui_test_utils::NavigateToURL(browser(), GURL(chrome::kAboutBlankURL));
137 std::wstring title = UTF16ToWide(l10n_util::GetStringFUTF16( 137 std::wstring title = UTF16ToWide(l10n_util::GetStringFUTF16(
138 IDS_BROWSER_WINDOW_TITLE_FORMAT, 138 IDS_BROWSER_WINDOW_TITLE_FORMAT,
139 ASCIIToUTF16(chrome::kAboutBlankURL))); 139 ASCIIToUTF16(chrome::kAboutBlankURL)));
140 TestAccessibilityInfo(acc_obj, title, ROLE_SYSTEM_WINDOW); 140 TestAccessibilityInfo(acc_obj, title, ROLE_SYSTEM_WINDOW);
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
269 ASSERT_EQ(S_OK, hr); 269 ASSERT_EQ(S_OK, hr);
270 ASSERT_TRUE(NULL != acc_obj); 270 ASSERT_TRUE(NULL != acc_obj);
271 271
272 TestAccessibilityInfo( 272 TestAccessibilityInfo(
273 acc_obj, 273 acc_obj,
274 UTF16ToWide(l10n_util::GetStringUTF16(IDS_ABOUT_CHROME_TITLE)), 274 UTF16ToWide(l10n_util::GetStringUTF16(IDS_ABOUT_CHROME_TITLE)),
275 ROLE_SYSTEM_DIALOG); 275 ROLE_SYSTEM_DIALOG);
276 276
277 acc_obj->Release(); 277 acc_obj->Release();
278 } 278 }
OLDNEW
« no previous file with comments | « chrome/browser/accessibility/browser_accessibility_win_unittest.cc ('k') | chrome/browser/aeropeek_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698