| 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/bind.h" | 5 #include "base/bind.h" |
| 6 #include "base/command_line.h" | 6 #include "base/command_line.h" |
| 7 #include "base/compiler_specific.h" | 7 #include "base/compiler_specific.h" |
| 8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
| 9 #include "chrome/browser/chromeos/cros/cros_in_process_browser_test.h" | 9 #include "chrome/browser/chromeos/cros/cros_in_process_browser_test.h" |
| 10 #include "chrome/browser/chromeos/cros/cros_mock.h" | 10 #include "chrome/browser/chromeos/cros/cros_mock.h" |
| (...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 103 testing_profile_(NULL) { | 103 testing_profile_(NULL) { |
| 104 } | 104 } |
| 105 | 105 |
| 106 ExistingUserController* existing_user_controller() { | 106 ExistingUserController* existing_user_controller() { |
| 107 return ExistingUserController::current_controller(); | 107 return ExistingUserController::current_controller(); |
| 108 } | 108 } |
| 109 | 109 |
| 110 virtual void SetUpInProcessBrowserTestFixture() OVERRIDE { | 110 virtual void SetUpInProcessBrowserTestFixture() OVERRIDE { |
| 111 MockDBusThreadManager* mock_dbus_thread_manager = | 111 MockDBusThreadManager* mock_dbus_thread_manager = |
| 112 new MockDBusThreadManager; | 112 new MockDBusThreadManager; |
| 113 EXPECT_CALL(*mock_dbus_thread_manager, GetSystemBus()) |
| 114 .WillRepeatedly(Return(reinterpret_cast<dbus::Bus*>(NULL))); |
| 113 DBusThreadManager::InitializeForTesting(mock_dbus_thread_manager); | 115 DBusThreadManager::InitializeForTesting(mock_dbus_thread_manager); |
| 114 CrosInProcessBrowserTest::SetUpInProcessBrowserTestFixture(); | 116 CrosInProcessBrowserTest::SetUpInProcessBrowserTestFixture(); |
| 115 cros_mock_->InitStatusAreaMocks(); | 117 cros_mock_->InitStatusAreaMocks(); |
| 116 cros_mock_->SetStatusAreaMocksExpectations(); | 118 cros_mock_->SetStatusAreaMocksExpectations(); |
| 117 | 119 |
| 118 mock_network_library_ = cros_mock_->mock_network_library(); | 120 mock_network_library_ = cros_mock_->mock_network_library(); |
| 119 EXPECT_CALL(*mock_network_library_, AddUserActionObserver(_)) | 121 EXPECT_CALL(*mock_network_library_, AddUserActionObserver(_)) |
| 120 .Times(AnyNumber()); | 122 .Times(AnyNumber()); |
| 121 MockSessionManagerClient* mock_session_manager_client = | 123 MockSessionManagerClient* mock_session_manager_client = |
| 122 mock_dbus_thread_manager->mock_session_manager_client(); | 124 mock_dbus_thread_manager->mock_session_manager_client(); |
| (...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 315 EXPECT_CALL(*mock_login_display_host_.get(), OnCompleteLogin()) | 317 EXPECT_CALL(*mock_login_display_host_.get(), OnCompleteLogin()) |
| 316 .Times(1); | 318 .Times(1); |
| 317 EXPECT_CALL(*mock_user_manager_.user_manager(), IsCurrentUserNew()) | 319 EXPECT_CALL(*mock_user_manager_.user_manager(), IsCurrentUserNew()) |
| 318 .Times(AnyNumber()) | 320 .Times(AnyNumber()) |
| 319 .WillRepeatedly(Return(true)); | 321 .WillRepeatedly(Return(true)); |
| 320 existing_user_controller()->CompleteLogin(kNewUsername, kPassword); | 322 existing_user_controller()->CompleteLogin(kNewUsername, kPassword); |
| 321 content::RunAllPendingInMessageLoop(); | 323 content::RunAllPendingInMessageLoop(); |
| 322 } | 324 } |
| 323 | 325 |
| 324 } // namespace chromeos | 326 } // namespace chromeos |
| OLD | NEW |