OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/browser.h" | 7 #include "chrome/browser/browser.h" |
8 #include "chrome/browser/chromeos/cros/cros_in_process_browser_test.h" | 8 #include "chrome/browser/chromeos/cros/cros_in_process_browser_test.h" |
9 #include "chrome/browser/profile_manager.h" | 9 #include "chrome/browser/profile_manager.h" |
10 #include "chrome/browser/chromeos/cros/mock_cryptohome_library.h" | 10 #include "chrome/browser/chromeos/cros/mock_cryptohome_library.h" |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
43 .WillRepeatedly( | 43 .WillRepeatedly( |
44 InvokeWithoutArgs(CreateFallbackInputMethodDescriptors)); | 44 InvokeWithoutArgs(CreateFallbackInputMethodDescriptors)); |
45 EXPECT_CALL(mock_input_method_library_, current_ime_properties()) | 45 EXPECT_CALL(mock_input_method_library_, current_ime_properties()) |
46 .WillOnce((ReturnRef(ime_properties_))); | 46 .WillOnce((ReturnRef(ime_properties_))); |
47 | 47 |
48 testApi_->SetNetworkLibrary(&mock_network_library_, false); | 48 testApi_->SetNetworkLibrary(&mock_network_library_, false); |
49 | 49 |
50 testApi_->SetPowerLibrary(&mock_power_library_, false); | 50 testApi_->SetPowerLibrary(&mock_power_library_, false); |
51 EXPECT_CALL(mock_power_library_, battery_time_to_empty()) | 51 EXPECT_CALL(mock_power_library_, battery_time_to_empty()) |
52 .WillRepeatedly((Return(base::TimeDelta::FromMinutes(42)))); | 52 .WillRepeatedly((Return(base::TimeDelta::FromMinutes(42)))); |
| 53 EXPECT_CALL(mock_power_library_, battery_time_to_full()) |
| 54 .WillRepeatedly((Return(base::TimeDelta::FromMinutes(24)))); |
53 | 55 |
54 testApi_->SetSynapticsLibrary(&mock_synaptics_library_, false); | 56 testApi_->SetSynapticsLibrary(&mock_synaptics_library_, false); |
55 testApi_->SetCryptohomeLibrary(&mock_cryptohome_library_, false); | 57 testApi_->SetCryptohomeLibrary(&mock_cryptohome_library_, false); |
56 testApi_->SetScreenLockLibrary(&mock_screen_lock_library_, false); | 58 testApi_->SetScreenLockLibrary(&mock_screen_lock_library_, false); |
57 testApi_->SetSystemLibrary(&mock_system_library_, false); | 59 testApi_->SetSystemLibrary(&mock_system_library_, false); |
58 } | 60 } |
59 | 61 |
60 protected: | 62 protected: |
61 NiceMock<MockLibraryLoader> loader_; | 63 NiceMock<MockLibraryLoader> loader_; |
62 NiceMock<MockCryptohomeLibrary> mock_cryptohome_library_; | 64 NiceMock<MockCryptohomeLibrary> mock_cryptohome_library_; |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
112 // On initial launch, we should get the OTR default profile. | 114 // On initial launch, we should get the OTR default profile. |
113 IN_PROC_BROWSER_TEST_F(LoginProfileTest, UserNotPassed) { | 115 IN_PROC_BROWSER_TEST_F(LoginProfileTest, UserNotPassed) { |
114 Profile* profile = browser()->profile(); | 116 Profile* profile = browser()->profile(); |
115 EXPECT_EQ("Default", profile->GetPath().BaseName().value()); | 117 EXPECT_EQ("Default", profile->GetPath().BaseName().value()); |
116 EXPECT_TRUE(profile->IsOffTheRecord()); | 118 EXPECT_TRUE(profile->IsOffTheRecord()); |
117 // Ensure there's no extension service for this profile. | 119 // Ensure there's no extension service for this profile. |
118 EXPECT_EQ(NULL, profile->GetExtensionsService()); | 120 EXPECT_EQ(NULL, profile->GetExtensionsService()); |
119 } | 121 } |
120 | 122 |
121 } // namespace chromeos | 123 } // namespace chromeos |
OLD | NEW |