| 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/memory/scoped_ptr.h" | 5 #include "base/memory/scoped_ptr.h" |
| 6 #include "chrome/browser/chromeos/cros/mock_network_library.h" | 6 #include "chrome/browser/chromeos/cros/mock_network_library.h" |
| 7 #include "chrome/browser/chromeos/login/mock_screen_observer.h" | 7 #include "chrome/browser/chromeos/login/mock_screen_observer.h" |
| 8 #include "chrome/browser/chromeos/login/update_screen.h" | 8 #include "chrome/browser/chromeos/login/update_screen.h" |
| 9 #include "chrome/browser/chromeos/login/wizard_controller.h" | 9 #include "chrome/browser/chromeos/login/wizard_controller.h" |
| 10 #include "chrome/browser/chromeos/login/wizard_in_process_browser_test.h" | 10 #include "chrome/browser/chromeos/login/wizard_in_process_browser_test.h" |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 49 cros_mock_->SetStatusAreaMocksExpectations(); | 49 cros_mock_->SetStatusAreaMocksExpectations(); |
| 50 | 50 |
| 51 MockSessionManagerClient* mock_session_manager_client | 51 MockSessionManagerClient* mock_session_manager_client |
| 52 = mock_dbus_thread_manager->mock_session_manager_client(); | 52 = mock_dbus_thread_manager->mock_session_manager_client(); |
| 53 EXPECT_CALL(*mock_session_manager_client, EmitLoginPromptReady()) | 53 EXPECT_CALL(*mock_session_manager_client, EmitLoginPromptReady()) |
| 54 .Times(1); | 54 .Times(1); |
| 55 | 55 |
| 56 mock_update_engine_client_ | 56 mock_update_engine_client_ |
| 57 = mock_dbus_thread_manager->mock_update_engine_client(); | 57 = mock_dbus_thread_manager->mock_update_engine_client(); |
| 58 | 58 |
| 59 // ChromeBrowserMainPartsChromeos::PostProfileInit() creates an | |
| 60 // AutomaticRebootManager which calls the following function. | |
| 61 EXPECT_CALL(*mock_update_engine_client_, GetLastStatus()) | |
| 62 .Times(1) | |
| 63 .WillRepeatedly(Return(MockUpdateEngineClient::Status())); | |
| 64 | |
| 65 // UpdateScreen::StartUpdate() will be called by the WizardController | 59 // UpdateScreen::StartUpdate() will be called by the WizardController |
| 66 // just after creating the update screen, so the expectations for that | 60 // just after creating the update screen, so the expectations for that |
| 67 // should be set up here. | 61 // should be set up here. |
| 68 EXPECT_CALL(*mock_update_engine_client_, AddObserver(_)) | 62 EXPECT_CALL(*mock_update_engine_client_, AddObserver(_)) |
| 69 .Times(AtLeast(1)); | 63 .Times(AtLeast(1)); |
| 70 EXPECT_CALL(*mock_update_engine_client_, RemoveObserver(_)) | 64 EXPECT_CALL(*mock_update_engine_client_, RemoveObserver(_)) |
| 71 .Times(AtLeast(1)); | 65 .Times(AtLeast(1)); |
| 72 EXPECT_CALL(*mock_update_engine_client_, RequestUpdateCheck(_)) | 66 EXPECT_CALL(*mock_update_engine_client_, RequestUpdateCheck(_)) |
| 73 .Times(1) | 67 .Times(1) |
| 74 .WillOnce(Invoke(RequestUpdateCheckSuccess)); | 68 .WillOnce(Invoke(RequestUpdateCheckSuccess)); |
| (...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 229 EXPECT_CALL(*mock_update_engine_client_, GetLastStatus()) | 223 EXPECT_CALL(*mock_update_engine_client_, GetLastStatus()) |
| 230 .Times(AtLeast(1)) | 224 .Times(AtLeast(1)) |
| 231 .WillRepeatedly(Return(status)); | 225 .WillRepeatedly(Return(status)); |
| 232 EXPECT_CALL(*mock_screen_observer_, | 226 EXPECT_CALL(*mock_screen_observer_, |
| 233 OnExit(ScreenObserver::UPDATE_ERROR_UPDATING)) | 227 OnExit(ScreenObserver::UPDATE_ERROR_UPDATING)) |
| 234 .Times(1); | 228 .Times(1); |
| 235 update_screen_->UpdateStatusChanged(status); | 229 update_screen_->UpdateStatusChanged(status); |
| 236 } | 230 } |
| 237 | 231 |
| 238 } // namespace chromeos | 232 } // namespace chromeos |
| OLD | NEW |