Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 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 | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #include "chrome/browser/chromeos/login/login_manager_test.h" | |
| 6 #include "chrome/browser/chromeos/login/startup_utils.h" | |
| 7 #include "chrome/browser/profiles/profile_manager.h" | |
| 8 #include "chrome/browser/ui/browser.h" | |
| 9 #include "chrome/browser/ui/browser_finder.h" | |
| 10 #include "chrome/browser/ui/browser_window.h" | |
| 11 #include "chrome/common/chrome_switches.h" | |
| 12 #include "testing/gtest/include/gtest/gtest.h" | |
| 13 | |
|
oshima
2013/08/20 14:56:01
namespace chromeos {
Nikita (slow)
2013/08/20 16:04:39
Done.
| |
| 14 namespace { | |
| 15 | |
| 16 const char* kTestUser = "test-user@gmail.com"; | |
|
oshima
2013/08/20 14:56:01
char[]
Nikita (slow)
2013/08/20 16:04:39
Done.
| |
| 17 | |
| 18 } // anonymous namespace | |
| 19 | |
| 20 class BrowserLoginTest : public chromeos::LoginManagerTest { | |
| 21 public: | |
| 22 BrowserLoginTest() : LoginManagerTest(true) {} | |
|
oshima
2013/08/20 14:56:01
virtual BrowserLOginTest() {}
Nikita (slow)
2013/08/20 16:04:39
Do you mean virtual destructor?
oshima
2013/08/20 17:52:47
yep sorry for typo.
Nikita (slow)
2013/08/20 18:04:21
Done.
| |
| 23 | |
| 24 virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE { | |
| 25 LoginManagerTest::SetUpCommandLine(command_line); | |
| 26 command_line->AppendSwitch(::switches::kCreateBrowserOnStartupForTests); | |
| 27 } | |
| 28 }; | |
| 29 | |
| 30 IN_PROC_BROWSER_TEST_F(BrowserLoginTest, PRE_BrowserActive) { | |
| 31 RegisterUser(kTestUser); | |
| 32 chromeos::StartupUtils::MarkOobeCompleted(); | |
| 33 } | |
| 34 | |
| 35 IN_PROC_BROWSER_TEST_F(BrowserLoginTest, BrowserActive) { | |
| 36 LoginUser(kTestUser); | |
| 37 Browser* browser = FindAnyBrowser(ProfileManager::GetDefaultProfile(), | |
| 38 false, | |
| 39 chrome::HOST_DESKTOP_TYPE_ASH); | |
| 40 EXPECT_TRUE(browser != NULL); | |
| 41 EXPECT_TRUE(browser->window()->IsActive()); | |
|
oshima
2013/08/20 14:56:01
can you test if the omnibox has focus as well? (th
Nikita (slow)
2013/08/20 16:04:39
Done.
| |
| 42 } | |
| OLD | NEW |