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

Unified Diff: chrome/browser/chromeos/status/input_method_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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/chromeos/status/accessibility_menu_button_browsertest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/status/input_method_menu_button_browsertest.cc
diff --git a/chrome/browser/chromeos/status/input_method_menu_button_browsertest.cc b/chrome/browser/chromeos/status/input_method_menu_button_browsertest.cc
index daacb0c382eaedf266dc214a184d8c6fa73a3d5a..e5a35ab0f19271eab9f9ce414446138c6ca65822 100644
--- a/chrome/browser/chromeos/status/input_method_menu_button_browsertest.cc
+++ b/chrome/browser/chromeos/status/input_method_menu_button_browsertest.cc
@@ -12,6 +12,10 @@
#include "chrome/browser/ui/browser_window.h"
#include "grit/theme_resources.h"
+#if defined(USE_AURA)
+#include "chrome/browser/ui/views/aura/chrome_shell_delegate.h"
+#endif
+
namespace chromeos {
class InputMethodMenuButtonTest : public CrosInProcessBrowserTest {
@@ -25,15 +29,20 @@ class InputMethodMenuButtonTest : public CrosInProcessBrowserTest {
cros_mock_->SetStatusAreaMocksExpectations();
}
- InputMethodMenuButton* GetInputMethodMenuButton() {
- BrowserView* view = static_cast<BrowserView*>(browser()->window());
- return static_cast<InputMethodMenuButton*>(view->GetViewByID(
- VIEW_ID_STATUS_BUTTON_INPUT_METHOD));
+ const InputMethodMenuButton* GetInputMethodMenuButton() {
+ const views::View* view =
+#if defined(USE_AURA)
+ ChromeShellDelegate::instance()->GetStatusAreaForTest();
+#else
+ static_cast<BrowserView*>(browser()->window());
+#endif
+ return static_cast<const InputMethodMenuButton*>(
+ view->GetViewByID(VIEW_ID_STATUS_BUTTON_INPUT_METHOD));
}
};
IN_PROC_BROWSER_TEST_F(InputMethodMenuButtonTest, InitialIndicatorTest) {
- InputMethodMenuButton* input_method = GetInputMethodMenuButton();
+ const InputMethodMenuButton* input_method = GetInputMethodMenuButton();
ASSERT_TRUE(input_method != NULL);
// By default, show the indicator of the hardware keyboard, which is set
« no previous file with comments | « chrome/browser/chromeos/status/accessibility_menu_button_browsertest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698