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

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

Issue 8438064: Separate StatusAreaView from StatusAreaViewChromeos (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase 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
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/caps_lock_menu_button.h" 5 #include "chrome/browser/chromeos/status/caps_lock_menu_button.h"
6 6
7 #include "base/string_util.h" 7 #include "base/string_util.h"
8 #include "chrome/browser/chromeos/cros/cros_in_process_browser_test.h" 8 #include "chrome/browser/chromeos/cros/cros_in_process_browser_test.h"
9 #include "chrome/browser/chromeos/frame/browser_view.h" 9 #include "chrome/browser/chromeos/frame/browser_view.h"
10 #include "chrome/browser/chromeos/status/status_area_view.h"
11 #include "chrome/browser/chromeos/view_ids.h" 10 #include "chrome/browser/chromeos/view_ids.h"
12 #include "chrome/browser/ui/browser.h" 11 #include "chrome/browser/ui/browser.h"
13 #include "chrome/browser/ui/browser_window.h" 12 #include "chrome/browser/ui/browser_window.h"
14 #include "grit/theme_resources.h" 13 #include "grit/theme_resources.h"
15 14
16 namespace chromeos { 15 namespace chromeos {
17 16
18 class CapsLockMenuButtonTest : public CrosInProcessBrowserTest { 17 class CapsLockMenuButtonTest : public CrosInProcessBrowserTest {
19 protected: 18 protected:
20 CapsLockMenuButtonTest() 19 CapsLockMenuButtonTest()
21 : CrosInProcessBrowserTest() { 20 : CrosInProcessBrowserTest() {
22 } 21 }
23 22
24 virtual void SetUpInProcessBrowserTestFixture() { 23 virtual void SetUpInProcessBrowserTestFixture() {
25 cros_mock_->InitStatusAreaMocks(); 24 cros_mock_->InitStatusAreaMocks();
26 cros_mock_->SetStatusAreaMocksExpectations(); 25 cros_mock_->SetStatusAreaMocksExpectations();
27 } 26 }
28 27
29 CapsLockMenuButton* GetCapsLockMenuButton() { 28 CapsLockMenuButton* GetCapsLockMenuButton() {
30 BrowserView* view = static_cast<BrowserView*>(browser()->window()); 29 BrowserView* view = static_cast<BrowserView*>(browser()->window());
31 return static_cast<StatusAreaView*>(view-> 30 return static_cast<CapsLockMenuButton*>(view->GetViewByID(
32 GetViewByID(VIEW_ID_STATUS_AREA))->caps_lock_view(); 31 VIEW_ID_STATUS_BUTTON_CAPS_LOCK));
33 } 32 }
34 }; 33 };
35 34
36 IN_PROC_BROWSER_TEST_F(CapsLockMenuButtonTest, InitialIndicatorTest) { 35 IN_PROC_BROWSER_TEST_F(CapsLockMenuButtonTest, InitialIndicatorTest) {
37 CapsLockMenuButton* caps_lock = GetCapsLockMenuButton(); 36 CapsLockMenuButton* caps_lock = GetCapsLockMenuButton();
38 ASSERT_TRUE(caps_lock != NULL); 37 ASSERT_TRUE(caps_lock != NULL);
39 38
40 // By default, the indicator shouldn't be shown. 39 // By default, the indicator shouldn't be shown.
41 EXPECT_FALSE(caps_lock->IsVisible()); 40 EXPECT_FALSE(caps_lock->IsVisible());
42 } 41 }
43 42
44 } // namespace chromeos 43 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/status/caps_lock_menu_button.cc ('k') | chrome/browser/chromeos/status/clock_menu_button.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698