OLD | NEW |
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 "base/command_line.h" | 5 #include "base/command_line.h" |
6 #include "base/time.h" | 6 #include "base/time.h" |
7 #include "chrome/browser/chromeos/cros/cros_in_process_browser_test.h" | 7 #include "chrome/browser/chromeos/cros/cros_in_process_browser_test.h" |
8 #include "chrome/browser/chromeos/cros/mock_cryptohome_library.h" | 8 #include "chrome/browser/chromeos/cros/mock_cryptohome_library.h" |
9 #include "chrome/browser/chromeos/cros/mock_library_loader.h" | 9 #include "chrome/browser/chromeos/cros/mock_library_loader.h" |
10 #include "chrome/browser/chromeos/cros/mock_network_library.h" | 10 #include "chrome/browser/chromeos/cros/mock_network_library.h" |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
44 MockScreenLockLibrary* mock_screen_lock_library_; | 44 MockScreenLockLibrary* mock_screen_lock_library_; |
45 | 45 |
46 private: | 46 private: |
47 DISALLOW_COPY_AND_ASSIGN(LoginTestBase); | 47 DISALLOW_COPY_AND_ASSIGN(LoginTestBase); |
48 }; | 48 }; |
49 | 49 |
50 class LoginUserTest : public LoginTestBase { | 50 class LoginUserTest : public LoginTestBase { |
51 protected: | 51 protected: |
52 virtual void SetUpInProcessBrowserTestFixture() { | 52 virtual void SetUpInProcessBrowserTestFixture() { |
53 LoginTestBase::SetUpInProcessBrowserTestFixture(); | 53 LoginTestBase::SetUpInProcessBrowserTestFixture(); |
| 54 // TODO(nkostylev): Remove this once Aura build includes ScreenLocker. |
| 55 #if !defined(USE_AURA) |
54 EXPECT_CALL(*mock_screen_lock_library_, AddObserver(_)) | 56 EXPECT_CALL(*mock_screen_lock_library_, AddObserver(_)) |
55 .WillOnce(Return()); | 57 .WillOnce(Return()); |
| 58 #endif |
56 } | 59 } |
57 | 60 |
58 virtual void SetUpCommandLine(CommandLine* command_line) { | 61 virtual void SetUpCommandLine(CommandLine* command_line) { |
59 command_line->AppendSwitchASCII(switches::kLoginUser, "TestUser@gmail.com"); | 62 command_line->AppendSwitchASCII(switches::kLoginUser, "TestUser@gmail.com"); |
60 command_line->AppendSwitchASCII(switches::kLoginProfile, "user"); | 63 command_line->AppendSwitchASCII(switches::kLoginProfile, "user"); |
61 command_line->AppendSwitch(switches::kNoFirstRun); | 64 command_line->AppendSwitch(switches::kNoFirstRun); |
62 } | 65 } |
63 }; | 66 }; |
64 | 67 |
65 class LoginProfileTest : public LoginTestBase { | 68 class LoginProfileTest : public LoginTestBase { |
(...skipping 16 matching lines...) Expand all Loading... |
82 // On initial launch, we should get the OTR default profile. | 85 // On initial launch, we should get the OTR default profile. |
83 IN_PROC_BROWSER_TEST_F(LoginProfileTest, UserNotPassed) { | 86 IN_PROC_BROWSER_TEST_F(LoginProfileTest, UserNotPassed) { |
84 Profile* profile = browser()->profile(); | 87 Profile* profile = browser()->profile(); |
85 EXPECT_EQ("Default", profile->GetPath().BaseName().value()); | 88 EXPECT_EQ("Default", profile->GetPath().BaseName().value()); |
86 EXPECT_TRUE(profile->IsOffTheRecord()); | 89 EXPECT_TRUE(profile->IsOffTheRecord()); |
87 // Ensure there's extension service for this profile. | 90 // Ensure there's extension service for this profile. |
88 EXPECT_TRUE(profile->GetExtensionService()); | 91 EXPECT_TRUE(profile->GetExtensionService()); |
89 } | 92 } |
90 | 93 |
91 } // namespace chromeos | 94 } // namespace chromeos |
OLD | NEW |