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

Side by Side Diff: chrome/browser/chromeos/status/accessibility_menu_button_browsertest.cc

Issue 8625004: aura: Fix input method and a11y status area browser tests. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 1 month 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
« no previous file with comments | « no previous file | chrome/browser/chromeos/status/input_method_menu_button_browsertest.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) 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 "chrome/browser/chromeos/status/accessibility_menu_button.h" 5 #include "chrome/browser/chromeos/status/accessibility_menu_button.h"
6 6
7 #include "chrome/browser/chromeos/accessibility_util.h" 7 #include "chrome/browser/chromeos/accessibility_util.h"
8 #include "chrome/browser/chromeos/frame/browser_view.h" 8 #include "chrome/browser/chromeos/frame/browser_view.h"
9 #include "chrome/browser/chromeos/view_ids.h" 9 #include "chrome/browser/chromeos/view_ids.h"
10 #include "chrome/test/base/in_process_browser_test.h" 10 #include "chrome/test/base/in_process_browser_test.h"
11 #include "chrome/browser/ui/browser.h" 11 #include "chrome/browser/ui/browser.h"
12 #include "chrome/browser/ui/browser_window.h" 12 #include "chrome/browser/ui/browser_window.h"
13 13
14 #if defined(USE_AURA)
15 #include "chrome/browser/ui/views/aura/chrome_shell_delegate.h"
16 #endif
17
14 namespace chromeos { 18 namespace chromeos {
15 19
16 class AccessibilityMenuButtonTest : public InProcessBrowserTest { 20 class AccessibilityMenuButtonTest : public InProcessBrowserTest {
17 protected: 21 protected:
18 AccessibilityMenuButtonTest() : InProcessBrowserTest() { 22 AccessibilityMenuButtonTest() : InProcessBrowserTest() {
19 } 23 }
20 24
21 AccessibilityMenuButton* GetAccessibilityMenuButton() { 25 const AccessibilityMenuButton* GetAccessibilityMenuButton() {
22 BrowserView* view = static_cast<BrowserView*>(browser()->window()); 26 const views::View* view =
23 return static_cast<AccessibilityMenuButton*>(view->GetViewByID( 27 #if defined(USE_AURA)
24 VIEW_ID_STATUS_BUTTON_ACCESSIBILITY)); 28 ChromeShellDelegate::instance()->GetStatusAreaForTest();
29 #else
30 static_cast<BrowserView*>(browser()->window());
31 #endif
32 return static_cast<const AccessibilityMenuButton*>(
33 view->GetViewByID(VIEW_ID_STATUS_BUTTON_ACCESSIBILITY));
25 } 34 }
26 }; 35 };
27 36
28 IN_PROC_BROWSER_TEST_F(AccessibilityMenuButtonTest, 37 IN_PROC_BROWSER_TEST_F(AccessibilityMenuButtonTest,
29 VisibilityIsSyncedWithPreference) { 38 VisibilityIsSyncedWithPreference) {
30 AccessibilityMenuButton* button = GetAccessibilityMenuButton(); 39 const AccessibilityMenuButton* button = GetAccessibilityMenuButton();
31 ASSERT_TRUE(button != NULL); 40 ASSERT_TRUE(button != NULL);
32 41
33 accessibility::EnableAccessibility(true, NULL); 42 accessibility::EnableAccessibility(true, NULL);
34 EXPECT_TRUE(button->IsVisible()); 43 EXPECT_TRUE(button->IsVisible());
35 44
36 accessibility::EnableAccessibility(false, NULL); 45 accessibility::EnableAccessibility(false, NULL);
37 EXPECT_FALSE(button->IsVisible()); 46 EXPECT_FALSE(button->IsVisible());
38 } 47 }
39 48
40 } // namespace chromeos 49 } // namespace chromeos
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/chromeos/status/input_method_menu_button_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698