Chromium Code Reviews| 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 16 matching lines...) Expand all Loading... | |
| 27 } | 27 } |
| 28 | 28 |
| 29 protected: | 29 protected: |
| 30 virtual void SetUpInProcessBrowserTestFixture() { | 30 virtual void SetUpInProcessBrowserTestFixture() { |
| 31 cros_mock_->InitStatusAreaMocks(); | 31 cros_mock_->InitStatusAreaMocks(); |
| 32 cros_mock_->SetStatusAreaMocksExpectations(); | 32 cros_mock_->SetStatusAreaMocksExpectations(); |
| 33 cros_mock_->InitMockCryptohomeLibrary(); | 33 cros_mock_->InitMockCryptohomeLibrary(); |
| 34 mock_cryptohome_library_ = cros_mock_->mock_cryptohome_library(); | 34 mock_cryptohome_library_ = cros_mock_->mock_cryptohome_library(); |
| 35 EXPECT_CALL(*mock_cryptohome_library_, IsMounted()) | 35 EXPECT_CALL(*mock_cryptohome_library_, IsMounted()) |
| 36 .WillRepeatedly(Return(true)); | 36 .WillRepeatedly(Return(true)); |
| 37 EXPECT_CALL(*mock_cryptohome_library_, InstallAttributesIsReady()) | |
| 38 .WillRepeatedly(Return(false)); | |
|
Mattias Nissler (ping if slow)
2012/03/30 08:48:46
and this? It seems like the more reasonable choice
Joao da Silva
2012/03/30 10:09:23
Same reason. Returning false is more straightforwa
Mattias Nissler (ping if slow)
2012/03/30 11:46:35
Hm. In that case, why do we enable the flags for a
| |
| 37 } | 39 } |
| 38 | 40 |
| 39 MockCryptohomeLibrary* mock_cryptohome_library_; | 41 MockCryptohomeLibrary* mock_cryptohome_library_; |
| 40 | 42 |
| 41 private: | 43 private: |
| 42 DISALLOW_COPY_AND_ASSIGN(LoginTestBase); | 44 DISALLOW_COPY_AND_ASSIGN(LoginTestBase); |
| 43 }; | 45 }; |
| 44 | 46 |
| 45 class LoginUserTest : public LoginTestBase { | 47 class LoginUserTest : public LoginTestBase { |
| 46 protected: | 48 protected: |
| (...skipping 28 matching lines...) Expand all Loading... | |
| 75 // On initial launch, we should get the OTR default profile. | 77 // On initial launch, we should get the OTR default profile. |
| 76 IN_PROC_BROWSER_TEST_F(LoginProfileTest, UserNotPassed) { | 78 IN_PROC_BROWSER_TEST_F(LoginProfileTest, UserNotPassed) { |
| 77 Profile* profile = browser()->profile(); | 79 Profile* profile = browser()->profile(); |
| 78 EXPECT_EQ("Default", profile->GetPath().BaseName().value()); | 80 EXPECT_EQ("Default", profile->GetPath().BaseName().value()); |
| 79 EXPECT_TRUE(profile->IsOffTheRecord()); | 81 EXPECT_TRUE(profile->IsOffTheRecord()); |
| 80 // Ensure there's extension service for this profile. | 82 // Ensure there's extension service for this profile. |
| 81 EXPECT_TRUE(profile->GetExtensionService()); | 83 EXPECT_TRUE(profile->GetExtensionService()); |
| 82 } | 84 } |
| 83 | 85 |
| 84 } // namespace chromeos | 86 } // namespace chromeos |
| OLD | NEW |