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 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
130 EXPECT_CALL(*mock_dbus_thread_manager, GetSystemBus()) | 130 EXPECT_CALL(*mock_dbus_thread_manager, GetSystemBus()) |
131 .WillRepeatedly(Return(reinterpret_cast<dbus::Bus*>(NULL))); | 131 .WillRepeatedly(Return(reinterpret_cast<dbus::Bus*>(NULL))); |
132 DBusThreadManager::InitializeForTesting(mock_dbus_thread_manager); | 132 DBusThreadManager::InitializeForTesting(mock_dbus_thread_manager); |
133 CrosInProcessBrowserTest::SetUpInProcessBrowserTestFixture(); | 133 CrosInProcessBrowserTest::SetUpInProcessBrowserTestFixture(); |
134 cros_mock_->InitStatusAreaMocks(); | 134 cros_mock_->InitStatusAreaMocks(); |
135 cros_mock_->SetStatusAreaMocksExpectations(); | 135 cros_mock_->SetStatusAreaMocksExpectations(); |
136 | 136 |
137 mock_network_library_ = cros_mock_->mock_network_library(); | 137 mock_network_library_ = cros_mock_->mock_network_library(); |
138 EXPECT_CALL(*mock_network_library_, AddUserActionObserver(_)) | 138 EXPECT_CALL(*mock_network_library_, AddUserActionObserver(_)) |
139 .Times(AnyNumber()); | 139 .Times(AnyNumber()); |
140 EXPECT_CALL(*mock_network_library_, LoadOncNetworks(_, _, _, _, _)) | 140 EXPECT_CALL(*mock_network_library_, LoadOncNetworks(_, _, _, _)) |
141 .WillRepeatedly(Return(true)); | 141 .WillRepeatedly(Return(true)); |
142 | 142 |
143 MockSessionManagerClient* mock_session_manager_client = | 143 MockSessionManagerClient* mock_session_manager_client = |
144 mock_dbus_thread_manager->mock_session_manager_client(); | 144 mock_dbus_thread_manager->mock_session_manager_client(); |
145 EXPECT_CALL(*mock_session_manager_client, EmitLoginPromptReady()) | 145 EXPECT_CALL(*mock_session_manager_client, EmitLoginPromptReady()) |
146 .Times(1); | 146 .Times(1); |
147 EXPECT_CALL(*mock_session_manager_client, RetrieveDevicePolicy(_)) | 147 EXPECT_CALL(*mock_session_manager_client, RetrieveDevicePolicy(_)) |
148 .Times(AnyNumber()); | 148 .Times(AnyNumber()); |
149 | 149 |
150 mock_login_utils_ = new MockLoginUtils(); | 150 mock_login_utils_ = new MockLoginUtils(); |
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
331 .InSequence(uiEnabledSequence); | 331 .InSequence(uiEnabledSequence); |
332 EXPECT_CALL(*mock_login_display_, SetUIEnabled(true)) | 332 EXPECT_CALL(*mock_login_display_, SetUIEnabled(true)) |
333 .Times(1) | 333 .Times(1) |
334 .InSequence(uiEnabledSequence); | 334 .InSequence(uiEnabledSequence); |
335 | 335 |
336 existing_user_controller()->CompleteLogin(kNewUsername, kPassword); | 336 existing_user_controller()->CompleteLogin(kNewUsername, kPassword); |
337 content::RunAllPendingInMessageLoop(); | 337 content::RunAllPendingInMessageLoop(); |
338 } | 338 } |
339 | 339 |
340 } // namespace chromeos | 340 } // namespace chromeos |
OLD | NEW |