| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "chrome/browser/chromeos/cros/cros_in_process_browser_test.h" | 6 #include "chrome/browser/chromeos/cros/cros_in_process_browser_test.h" |
| 7 #include "chrome/browser/chromeos/cros/mock_cryptohome_library.h" | 7 #include "chrome/browser/chromeos/cros/mock_cryptohome_library.h" |
| 8 #include "chrome/browser/chromeos/cros/mock_network_library.h" | 8 #include "chrome/browser/chromeos/cros/mock_network_library.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 22 matching lines...) Expand all Loading... |
| 33 cros_mock_->SetStatusAreaMocksExpectations(); | 33 cros_mock_->SetStatusAreaMocksExpectations(); |
| 34 cros_mock_->InitMockCryptohomeLibrary(); | 34 cros_mock_->InitMockCryptohomeLibrary(); |
| 35 mock_cryptohome_library_ = cros_mock_->mock_cryptohome_library(); | 35 mock_cryptohome_library_ = cros_mock_->mock_cryptohome_library(); |
| 36 mock_network_library_ = cros_mock_->mock_network_library(); | 36 mock_network_library_ = cros_mock_->mock_network_library(); |
| 37 EXPECT_CALL(*mock_cryptohome_library_, GetSystemSalt()) | 37 EXPECT_CALL(*mock_cryptohome_library_, GetSystemSalt()) |
| 38 .WillRepeatedly(Return(std::string("stub_system_salt"))); | 38 .WillRepeatedly(Return(std::string("stub_system_salt"))); |
| 39 EXPECT_CALL(*mock_cryptohome_library_, InstallAttributesIsReady()) | 39 EXPECT_CALL(*mock_cryptohome_library_, InstallAttributesIsReady()) |
| 40 .WillRepeatedly(Return(false)); | 40 .WillRepeatedly(Return(false)); |
| 41 EXPECT_CALL(*mock_network_library_, AddUserActionObserver(_)) | 41 EXPECT_CALL(*mock_network_library_, AddUserActionObserver(_)) |
| 42 .Times(AnyNumber()); | 42 .Times(AnyNumber()); |
| 43 EXPECT_CALL(*mock_network_library_, LoadOncNetworks(_, _, _, _)) | 43 EXPECT_CALL(*mock_network_library_, LoadOncNetworks(_, _, _, _, _)) |
| 44 .WillRepeatedly(Return(true)); | 44 .WillRepeatedly(Return(true)); |
| 45 } | 45 } |
| 46 | 46 |
| 47 MockCryptohomeLibrary* mock_cryptohome_library_; | 47 MockCryptohomeLibrary* mock_cryptohome_library_; |
| 48 MockNetworkLibrary* mock_network_library_; | 48 MockNetworkLibrary* mock_network_library_; |
| 49 | 49 |
| 50 private: | 50 private: |
| 51 DISALLOW_COPY_AND_ASSIGN(LoginTestBase); | 51 DISALLOW_COPY_AND_ASSIGN(LoginTestBase); |
| 52 }; | 52 }; |
| 53 | 53 |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 86 // After a guest login, we should get the OTR default profile. | 86 // After a guest login, we should get the OTR default profile. |
| 87 IN_PROC_BROWSER_TEST_F(LoginGuestTest, GuestIsOTR) { | 87 IN_PROC_BROWSER_TEST_F(LoginGuestTest, GuestIsOTR) { |
| 88 Profile* profile = browser()->profile(); | 88 Profile* profile = browser()->profile(); |
| 89 EXPECT_EQ("Default", profile->GetPath().BaseName().value()); | 89 EXPECT_EQ("Default", profile->GetPath().BaseName().value()); |
| 90 EXPECT_TRUE(profile->IsOffTheRecord()); | 90 EXPECT_TRUE(profile->IsOffTheRecord()); |
| 91 // Ensure there's extension service for this profile. | 91 // Ensure there's extension service for this profile. |
| 92 EXPECT_TRUE(profile->GetExtensionService()); | 92 EXPECT_TRUE(profile->GetExtensionService()); |
| 93 } | 93 } |
| 94 | 94 |
| 95 } // namespace chromeos | 95 } // namespace chromeos |
| OLD | NEW |