OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "ash/session/session_state_delegate.h" | 5 #include "ash/session/session_state_delegate.h" |
6 #include "ash/shell.h" | 6 #include "ash/shell.h" |
7 #include "chrome/browser/chromeos/login/login_manager_test.h" | 7 #include "chrome/browser/chromeos/login/login_manager_test.h" |
8 #include "chrome/browser/chromeos/login/startup_utils.h" | 8 #include "chrome/browser/chromeos/login/startup_utils.h" |
9 #include "chrome/browser/profiles/profile_manager.h" | 9 #include "chrome/browser/profiles/profile_manager.h" |
10 #include "chrome/browser/ui/browser.h" | 10 #include "chrome/browser/ui/browser.h" |
(...skipping 12 matching lines...) Expand all Loading... |
23 | 23 |
24 const char kTestUser[] = "test-user@gmail.com"; | 24 const char kTestUser[] = "test-user@gmail.com"; |
25 | 25 |
26 } // anonymous namespace | 26 } // anonymous namespace |
27 | 27 |
28 class BrowserLoginTest : public chromeos::LoginManagerTest { | 28 class BrowserLoginTest : public chromeos::LoginManagerTest { |
29 public: | 29 public: |
30 BrowserLoginTest() : LoginManagerTest(true) {} | 30 BrowserLoginTest() : LoginManagerTest(true) {} |
31 virtual ~BrowserLoginTest() {} | 31 virtual ~BrowserLoginTest() {} |
32 | 32 |
33 virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE { | 33 virtual void SetUpCommandLine(CommandLine* command_line) override { |
34 LoginManagerTest::SetUpCommandLine(command_line); | 34 LoginManagerTest::SetUpCommandLine(command_line); |
35 command_line->AppendSwitch(::switches::kCreateBrowserOnStartupForTests); | 35 command_line->AppendSwitch(::switches::kCreateBrowserOnStartupForTests); |
36 } | 36 } |
37 }; | 37 }; |
38 | 38 |
39 IN_PROC_BROWSER_TEST_F(BrowserLoginTest, PRE_BrowserActive) { | 39 IN_PROC_BROWSER_TEST_F(BrowserLoginTest, PRE_BrowserActive) { |
40 RegisterUser(kTestUser); | 40 RegisterUser(kTestUser); |
41 EXPECT_EQ(ash::SessionStateDelegate::SESSION_STATE_LOGIN_PRIMARY, | 41 EXPECT_EQ(ash::SessionStateDelegate::SESSION_STATE_LOGIN_PRIMARY, |
42 ash::Shell::GetInstance()->session_state_delegate()-> | 42 ash::Shell::GetInstance()->session_state_delegate()-> |
43 GetSessionState()); | 43 GetSessionState()); |
(...skipping 19 matching lines...) Expand all Loading... |
63 GetBrowserWindowTesting()->GetTabContentsContainerView()-> | 63 GetBrowserWindowTesting()->GetTabContentsContainerView()-> |
64 GetFocusManager(); | 64 GetFocusManager(); |
65 EXPECT_TRUE(focus_manager != NULL); | 65 EXPECT_TRUE(focus_manager != NULL); |
66 | 66 |
67 const views::View* focused_view = focus_manager->GetFocusedView(); | 67 const views::View* focused_view = focus_manager->GetFocusedView(); |
68 EXPECT_TRUE(focused_view != NULL); | 68 EXPECT_TRUE(focused_view != NULL); |
69 EXPECT_EQ(VIEW_ID_OMNIBOX, focused_view->id()); | 69 EXPECT_EQ(VIEW_ID_OMNIBOX, focused_view->id()); |
70 } | 70 } |
71 | 71 |
72 } // namespace chromeos | 72 } // namespace chromeos |
OLD | NEW |