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

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

Issue 2845022: Enables the new wrench menu by default on windows. (Closed)
Patch Set: Fix include Created 10 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
« no previous file with comments | « no previous file | chrome/browser/wrench_menu_model.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 "app/l10n_util.h" 7 #include "app/l10n_util.h"
8 #include "base/scoped_comptr_win.h" 8 #include "base/scoped_comptr_win.h"
9 #include "chrome/browser/browser.h" 9 #include "chrome/browser/browser.h"
10 #include "chrome/browser/browser_window.h" 10 #include "chrome/browser/browser_window.h"
11 #include "chrome/browser/view_ids.h" 11 #include "chrome/browser/view_ids.h"
12 #include "chrome/browser/views/bookmark_bar_view.h" 12 #include "chrome/browser/views/bookmark_bar_view.h"
13 #include "chrome/browser/views/frame/browser_view.h" 13 #include "chrome/browser/views/frame/browser_view.h"
14 #include "chrome/browser/views/toolbar_view.h" 14 #include "chrome/browser/views/toolbar_view.h"
15 #include "chrome/browser/wrench_menu_model.h"
15 #include "chrome/common/url_constants.h" 16 #include "chrome/common/url_constants.h"
16 #include "chrome/test/in_process_browser_test.h" 17 #include "chrome/test/in_process_browser_test.h"
17 #include "chrome/test/ui_test_utils.h" 18 #include "chrome/test/ui_test_utils.h"
18 #include "grit/chromium_strings.h" 19 #include "grit/chromium_strings.h"
19 #include "grit/generated_resources.h" 20 #include "grit/generated_resources.h"
20 #include "views/accessibility/view_accessibility_wrapper.h" 21 #include "views/accessibility/view_accessibility_wrapper.h"
21 #include "views/widget/root_view.h" 22 #include "views/widget/root_view.h"
22 #include "views/widget/widget_win.h" 23 #include "views/widget/widget_win.h"
23 #include "views/window/window.h" 24 #include "views/window/window.h"
24 25
(...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after
217 TestStarButtonAccObj) { 218 TestStarButtonAccObj) {
218 // Verify Star button MSAA name and role. 219 // Verify Star button MSAA name and role.
219 TestViewAccessibilityObject( 220 TestViewAccessibilityObject(
220 GetToolbarView()->GetViewByID(VIEW_ID_STAR_BUTTON), 221 GetToolbarView()->GetViewByID(VIEW_ID_STAR_BUTTON),
221 l10n_util::GetString(IDS_ACCNAME_STAR), ROLE_SYSTEM_PUSHBUTTON); 222 l10n_util::GetString(IDS_ACCNAME_STAR), ROLE_SYSTEM_PUSHBUTTON);
222 } 223 }
223 224
224 // Retrieve accessibility object for Page menu button and verify accessibility 225 // Retrieve accessibility object for Page menu button and verify accessibility
225 // info. 226 // info.
226 IN_PROC_BROWSER_TEST_F(BrowserViewsAccessibilityTest, TestPageMenuAccObj) { 227 IN_PROC_BROWSER_TEST_F(BrowserViewsAccessibilityTest, TestPageMenuAccObj) {
228 if (WrenchMenuModel::IsEnabled())
229 return; // If the wrench menu is enabled there is no page menu.
230
227 // Verify Page menu button MSAA name and role. 231 // Verify Page menu button MSAA name and role.
228 TestViewAccessibilityObject(GetToolbarView()->GetViewByID(VIEW_ID_PAGE_MENU), 232 TestViewAccessibilityObject(GetToolbarView()->GetViewByID(VIEW_ID_PAGE_MENU),
229 l10n_util::GetString(IDS_ACCNAME_PAGE), 233 l10n_util::GetString(IDS_ACCNAME_PAGE),
230 ROLE_SYSTEM_BUTTONMENU); 234 ROLE_SYSTEM_BUTTONMENU);
231 } 235 }
232 236
233 // Retrieve accessibility object for App menu button and verify accessibility 237 // Retrieve accessibility object for App menu button and verify accessibility
234 // info. 238 // info.
235 IN_PROC_BROWSER_TEST_F(BrowserViewsAccessibilityTest, TestAppMenuAccObj) { 239 IN_PROC_BROWSER_TEST_F(BrowserViewsAccessibilityTest, TestAppMenuAccObj) {
236 // Verify App menu button MSAA name and role. 240 // Verify App menu button MSAA name and role.
(...skipping 27 matching lines...) Expand all
264 reinterpret_cast<void**>(&acc_obj)); 268 reinterpret_cast<void**>(&acc_obj));
265 ASSERT_EQ(S_OK, hr); 269 ASSERT_EQ(S_OK, hr);
266 ASSERT_TRUE(NULL != acc_obj); 270 ASSERT_TRUE(NULL != acc_obj);
267 271
268 TestAccessibilityInfo(acc_obj, l10n_util::GetString(IDS_ABOUT_CHROME_TITLE), 272 TestAccessibilityInfo(acc_obj, l10n_util::GetString(IDS_ABOUT_CHROME_TITLE),
269 ROLE_SYSTEM_DIALOG); 273 ROLE_SYSTEM_DIALOG);
270 274
271 acc_obj->Release(); 275 acc_obj->Release();
272 } 276 }
273 } // Namespace. 277 } // Namespace.
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/wrench_menu_model.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698