| 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/message_loop.h" | 5 #include "base/message_loop.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/cros/mock_update_library.h" | 7 #include "chrome/browser/chromeos/cros/mock_update_library.h" |
| 8 #include "chrome/browser/chromeos/dbus/mock_dbus_thread_manager.h" | 8 #include "chrome/browser/chromeos/dbus/mock_dbus_thread_manager.h" |
| 9 #include "chrome/browser/chromeos/dbus/mock_session_manager_client.h" | 9 #include "chrome/browser/chromeos/dbus/mock_session_manager_client.h" |
| 10 #include "chrome/browser/chromeos/login/mock_screen_observer.h" | 10 #include "chrome/browser/chromeos/login/mock_screen_observer.h" |
| (...skipping 21 matching lines...) Expand all Loading... |
| 32 mock_network_library_(NULL) {} | 32 mock_network_library_(NULL) {} |
| 33 | 33 |
| 34 protected: | 34 protected: |
| 35 virtual void SetUpInProcessBrowserTestFixture() { | 35 virtual void SetUpInProcessBrowserTestFixture() { |
| 36 MockDBusThreadManager* mock_dbus_thread_manager = | 36 MockDBusThreadManager* mock_dbus_thread_manager = |
| 37 new MockDBusThreadManager; | 37 new MockDBusThreadManager; |
| 38 DBusThreadManager::InitializeForTesting(mock_dbus_thread_manager); | 38 DBusThreadManager::InitializeForTesting(mock_dbus_thread_manager); |
| 39 WizardInProcessBrowserTest::SetUpInProcessBrowserTestFixture(); | 39 WizardInProcessBrowserTest::SetUpInProcessBrowserTestFixture(); |
| 40 cros_mock_->InitStatusAreaMocks(); | 40 cros_mock_->InitStatusAreaMocks(); |
| 41 cros_mock_->SetStatusAreaMocksExpectations(); | 41 cros_mock_->SetStatusAreaMocksExpectations(); |
| 42 ASSERT_TRUE(CrosLibrary::Get()->EnsureLoaded()); | |
| 43 | 42 |
| 44 MockSessionManagerClient* mock_session_manager_client | 43 MockSessionManagerClient* mock_session_manager_client |
| 45 = mock_dbus_thread_manager->mock_session_manager_client(); | 44 = mock_dbus_thread_manager->mock_session_manager_client(); |
| 46 EXPECT_CALL(*mock_session_manager_client, EmitLoginPromptReady()) | 45 EXPECT_CALL(*mock_session_manager_client, EmitLoginPromptReady()) |
| 47 .Times(1); | 46 .Times(1); |
| 48 | 47 |
| 49 mock_update_library_ = new MockUpdateLibrary(); | 48 mock_update_library_ = new MockUpdateLibrary(); |
| 50 cros_mock_->test_api()->SetUpdateLibrary(mock_update_library_, true); | 49 cros_mock_->test_api()->SetUpdateLibrary(mock_update_library_, true); |
| 51 | 50 |
| 52 // UpdateScreen::StartUpdate() will be called by the WizardController | 51 // UpdateScreen::StartUpdate() will be called by the WizardController |
| (...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 209 EXPECT_CALL(*mock_update_library_, status()) | 208 EXPECT_CALL(*mock_update_library_, status()) |
| 210 .Times(AtLeast(1)) | 209 .Times(AtLeast(1)) |
| 211 .WillRepeatedly(ReturnRef(status)); | 210 .WillRepeatedly(ReturnRef(status)); |
| 212 EXPECT_CALL(*mock_screen_observer_, | 211 EXPECT_CALL(*mock_screen_observer_, |
| 213 OnExit(ScreenObserver::UPDATE_ERROR_UPDATING)) | 212 OnExit(ScreenObserver::UPDATE_ERROR_UPDATING)) |
| 214 .Times(1); | 213 .Times(1); |
| 215 update_screen_->UpdateStatusChanged(status); | 214 update_screen_->UpdateStatusChanged(status); |
| 216 } | 215 } |
| 217 | 216 |
| 218 } // namespace chromeos | 217 } // namespace chromeos |
| OLD | NEW |