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

Unified Diff: chrome/browser/chromeos/status/caps_lock_menu_button_browsertest.cc

Issue 8591003: aura: Fix Chrome OS status area browser tests. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rename to GetStatusAreaForTest() and remove const-ness 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
Index: chrome/browser/chromeos/status/caps_lock_menu_button_browsertest.cc
diff --git a/chrome/browser/chromeos/status/caps_lock_menu_button_browsertest.cc b/chrome/browser/chromeos/status/caps_lock_menu_button_browsertest.cc
index 55345f1ea4bd5900252470521e93d09691e45983..593636e8ff315aacd053b095f93bbdc1ca0dd31c 100644
--- a/chrome/browser/chromeos/status/caps_lock_menu_button_browsertest.cc
+++ b/chrome/browser/chromeos/status/caps_lock_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 CapsLockMenuButtonTest : public CrosInProcessBrowserTest {
@@ -25,15 +29,20 @@ class CapsLockMenuButtonTest : public CrosInProcessBrowserTest {
cros_mock_->SetStatusAreaMocksExpectations();
}
- CapsLockMenuButton* GetCapsLockMenuButton() {
- BrowserView* view = static_cast<BrowserView*>(browser()->window());
- return static_cast<CapsLockMenuButton*>(view->GetViewByID(
- VIEW_ID_STATUS_BUTTON_CAPS_LOCK));
+ const CapsLockMenuButton* GetCapsLockMenuButton() {
+ const views::View* view =
+#if defined(USE_AURA)
+ ChromeShellDelegate::instance()->GetStatusAreaForTest();
+#else
+ static_cast<BrowserView*>(browser()->window());
+#endif
+ return static_cast<const CapsLockMenuButton*>(
+ view->GetViewByID(VIEW_ID_STATUS_BUTTON_CAPS_LOCK));
}
};
IN_PROC_BROWSER_TEST_F(CapsLockMenuButtonTest, InitialIndicatorTest) {
- CapsLockMenuButton* caps_lock = GetCapsLockMenuButton();
+ const CapsLockMenuButton* caps_lock = GetCapsLockMenuButton();
ASSERT_TRUE(caps_lock != NULL);
// By default, the indicator shouldn't be shown.
« no previous file with comments | « chrome/browser/chromeos/frame/layout_mode_button.cc ('k') | chrome/browser/chromeos/status/clock_menu_button_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698