| 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 "base/memory/scoped_ptr.h" | 6 #include "base/memory/scoped_ptr.h" |
| 7 #include "base/message_loop.h" | 7 #include "base/message_loop.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/chromeos/cros/mock_network_library.h" | 9 #include "chrome/browser/chromeos/cros/mock_network_library.h" |
| 10 #include "chrome/browser/chromeos/login/mock_authenticator.h" | 10 #include "chrome/browser/chromeos/login/mock_authenticator.h" |
| (...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 124 DBusThreadManager::Get()->GetPowerManagerClient()); | 124 DBusThreadManager::Get()->GetPowerManagerClient()); |
| 125 mock_session_manager_client_ = static_cast<MockSessionManagerClient*>( | 125 mock_session_manager_client_ = static_cast<MockSessionManagerClient*>( |
| 126 DBusThreadManager::Get()->GetSessionManagerClient()); | 126 DBusThreadManager::Get()->GetSessionManagerClient()); |
| 127 cros_mock_->InitStatusAreaMocks(); | 127 cros_mock_->InitStatusAreaMocks(); |
| 128 EXPECT_CALL(*mock_power_manager_client_, AddObserver(_)) | 128 EXPECT_CALL(*mock_power_manager_client_, AddObserver(_)) |
| 129 .Times(1) | 129 .Times(1) |
| 130 .RetiresOnSaturation(); | 130 .RetiresOnSaturation(); |
| 131 EXPECT_CALL(*mock_session_manager_client_, NotifyLockScreenDismissed()) | 131 EXPECT_CALL(*mock_session_manager_client_, NotifyLockScreenDismissed()) |
| 132 .Times(1) | 132 .Times(1) |
| 133 .RetiresOnSaturation(); | 133 .RetiresOnSaturation(); |
| 134 EXPECT_CALL(*mock_dbus_thread_manager->mock_update_engine_client(), | |
| 135 GetLastStatus()) | |
| 136 .Times(1) | |
| 137 .WillOnce(Return(MockUpdateEngineClient::Status())); | |
| 138 // Expectations for the status are on the screen lock window. | 134 // Expectations for the status are on the screen lock window. |
| 139 cros_mock_->SetStatusAreaMocksExpectations(); | 135 cros_mock_->SetStatusAreaMocksExpectations(); |
| 140 MockNetworkLibrary* mock_network_library = | 136 MockNetworkLibrary* mock_network_library = |
| 141 cros_mock_->mock_network_library(); | 137 cros_mock_->mock_network_library(); |
| 142 EXPECT_CALL(*mock_network_library, AddUserActionObserver(_)) | 138 EXPECT_CALL(*mock_network_library, AddUserActionObserver(_)) |
| 143 .Times(AnyNumber()); | 139 .Times(AnyNumber()); |
| 144 EXPECT_CALL(*mock_network_library, LoadOncNetworks(_, _, _, _)) | 140 EXPECT_CALL(*mock_network_library, LoadOncNetworks(_, _, _, _)) |
| 145 .WillRepeatedly(Return(true)); | 141 .WillRepeatedly(Return(true)); |
| 146 zero_duration_mode_.reset(new ui::ScopedAnimationDurationScaleMode( | 142 zero_duration_mode_.reset(new ui::ScopedAnimationDurationScaleMode( |
| 147 ui::ScopedAnimationDurationScaleMode::ZERO_DURATION)); | 143 ui::ScopedAnimationDurationScaleMode::ZERO_DURATION)); |
| (...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 269 content::RunAllPendingInMessageLoop(); | 265 content::RunAllPendingInMessageLoop(); |
| 270 EXPECT_EQ("", tester->GetPassword()); | 266 EXPECT_EQ("", tester->GetPassword()); |
| 271 | 267 |
| 272 // Close the locker to match expectations. | 268 // Close the locker to match expectations. |
| 273 ScreenLocker::Hide(); | 269 ScreenLocker::Hide(); |
| 274 content::RunAllPendingInMessageLoop(); | 270 content::RunAllPendingInMessageLoop(); |
| 275 EXPECT_FALSE(tester->IsLocked()); | 271 EXPECT_FALSE(tester->IsLocked()); |
| 276 } | 272 } |
| 277 | 273 |
| 278 } // namespace chromeos | 274 } // namespace chromeos |
| OLD | NEW |