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

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

Issue 8772041: Remove deprecated TabContentsDelegate::OpenURLFromTab variant (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 9 years 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"
10 #include "chrome/browser/chromeos/view_ids.h" 11 #include "chrome/browser/chromeos/view_ids.h"
11 #include "chrome/browser/ui/browser.h" 12 #include "chrome/browser/ui/browser.h"
12 #include "chrome/browser/ui/browser_window.h" 13 #include "chrome/browser/ui/browser_window.h"
13 #include "grit/theme_resources.h" 14 #include "grit/theme_resources.h"
14 15
15 #if defined(USE_AURA) 16 #if defined(USE_AURA)
16 #include "chrome/browser/ui/views/aura/chrome_shell_delegate.h" 17 #include "chrome/browser/ui/views/aura/chrome_shell_delegate.h"
17 #endif 18 #endif
18 19
19 namespace chromeos { 20 namespace chromeos {
20 21
21 class CapsLockMenuButtonTest : public CrosInProcessBrowserTest { 22 class CapsLockMenuButtonTest : public CrosInProcessBrowserTest {
22 protected: 23 protected:
23 CapsLockMenuButtonTest() 24 CapsLockMenuButtonTest()
24 : CrosInProcessBrowserTest() { 25 : CrosInProcessBrowserTest() {
25 } 26 }
26 27
27 virtual void SetUpInProcessBrowserTestFixture() { 28 virtual void SetUpInProcessBrowserTestFixture() {
28 cros_mock_->InitStatusAreaMocks(); 29 cros_mock_->InitStatusAreaMocks();
29 cros_mock_->SetStatusAreaMocksExpectations(); 30 cros_mock_->SetStatusAreaMocksExpectations();
30 } 31 }
31 32
32 const CapsLockMenuButton* GetCapsLockMenuButton() { 33 const CapsLockMenuButton* GetCapsLockMenuButton() {
33 const views::View* view = 34 const views::View* view =
34 #if defined(USE_AURA) 35 #if defined(USE_AURA)
35 ChromeShellDelegate::instance()->GetStatusAreaForTest(); 36 ChromeShellDelegate::instance()->GetStatusArea();
36 #else 37 #else
37 static_cast<BrowserView*>(browser()->window()); 38 static_cast<BrowserView*>(browser()->window());
38 #endif 39 #endif
39 return static_cast<const CapsLockMenuButton*>( 40 return static_cast<const CapsLockMenuButton*>(
40 view->GetViewByID(VIEW_ID_STATUS_BUTTON_CAPS_LOCK)); 41 view->GetViewByID(VIEW_ID_STATUS_BUTTON_CAPS_LOCK));
41 } 42 }
42 }; 43 };
43 44
44 IN_PROC_BROWSER_TEST_F(CapsLockMenuButtonTest, InitialIndicatorTest) { 45 IN_PROC_BROWSER_TEST_F(CapsLockMenuButtonTest, InitialIndicatorTest) {
45 const CapsLockMenuButton* caps_lock = GetCapsLockMenuButton(); 46 const CapsLockMenuButton* caps_lock = GetCapsLockMenuButton();
46 ASSERT_TRUE(caps_lock != NULL); 47 ASSERT_TRUE(caps_lock != NULL);
47 48
48 // By default, the indicator shouldn't be shown. 49 // By default, the indicator shouldn't be shown.
49 EXPECT_FALSE(caps_lock->IsVisible()); 50 EXPECT_FALSE(caps_lock->IsVisible());
50 } 51 }
51 52
52 } // namespace chromeos 53 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698