Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(596)

Side by Side Diff: chrome/browser/chromeos/login/existing_user_controller_browsertest.cc

Issue 9911029: Refactored the CloudPolicyProvider so that it becomes initialized once and stays initialized. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Updated expectations in failing browser_tests Created 8 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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/compiler_specific.h" 6 #include "base/compiler_specific.h"
7 #include "base/memory/scoped_ptr.h" 7 #include "base/memory/scoped_ptr.h"
8 #include "base/message_loop.h" 8 #include "base/message_loop.h"
9 #include "chrome/browser/chromeos/cros/cros_mock.h" 9 #include "chrome/browser/chromeos/cros/cros_mock.h"
10 #include "chrome/browser/chromeos/cros/cros_in_process_browser_test.h" 10 #include "chrome/browser/chromeos/cros/cros_in_process_browser_test.h"
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 EXPECT_CALL(*mock_session_manager_client, EmitLoginPromptReady()) 126 EXPECT_CALL(*mock_session_manager_client, EmitLoginPromptReady())
127 .Times(1); 127 .Times(1);
128 EXPECT_CALL(*mock_session_manager_client, RetrievePolicy(_)) 128 EXPECT_CALL(*mock_session_manager_client, RetrievePolicy(_))
129 .Times(AnyNumber()); 129 .Times(AnyNumber());
130 130
131 cros_mock_->InitMockCryptohomeLibrary(); 131 cros_mock_->InitMockCryptohomeLibrary();
132 mock_cryptohome_library_ = cros_mock_->mock_cryptohome_library(); 132 mock_cryptohome_library_ = cros_mock_->mock_cryptohome_library();
133 EXPECT_CALL(*mock_cryptohome_library_, IsMounted()) 133 EXPECT_CALL(*mock_cryptohome_library_, IsMounted())
134 .Times(AnyNumber()) 134 .Times(AnyNumber())
135 .WillRepeatedly(Return(true)); 135 .WillRepeatedly(Return(true));
136 EXPECT_CALL(*mock_cryptohome_library_, InstallAttributesIsReady())
137 .Times(AnyNumber())
138 .WillRepeatedly(Return(false));
Mattias Nissler (ping if slow) 2012/03/30 08:48:46 Why this?
Joao da Silva 2012/03/30 10:09:23 Because the --device-management-url and --enable-d
136 139
137 mock_login_utils_ = new MockLoginUtils(); 140 mock_login_utils_ = new MockLoginUtils();
138 LoginUtils::Set(mock_login_utils_); 141 LoginUtils::Set(mock_login_utils_);
139 EXPECT_CALL(*mock_login_utils_, PrewarmAuthentication()) 142 EXPECT_CALL(*mock_login_utils_, PrewarmAuthentication())
140 .Times(AnyNumber()); 143 .Times(AnyNumber());
141 EXPECT_CALL(*mock_login_utils_, StopBackgroundFetchers()) 144 EXPECT_CALL(*mock_login_utils_, StopBackgroundFetchers())
142 .Times(AnyNumber()); 145 .Times(AnyNumber());
143 146
144 mock_login_display_.reset(new MockLoginDisplay()); 147 mock_login_display_.reset(new MockLoginDisplay());
145 mock_login_display_host_.reset(new MockLoginDisplayHost()); 148 mock_login_display_host_.reset(new MockLoginDisplayHost());
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
280 .Times(1); 283 .Times(1);
281 EXPECT_CALL(*mock_login_display_.get(), OnFadeOut()) 284 EXPECT_CALL(*mock_login_display_.get(), OnFadeOut())
282 .Times(1); 285 .Times(1);
283 EXPECT_CALL(*mock_login_display_host_.get(), OnCompleteLogin()) 286 EXPECT_CALL(*mock_login_display_host_.get(), OnCompleteLogin())
284 .Times(1); 287 .Times(1);
285 existing_user_controller()->CompleteLogin(kNewUsername, kPassword); 288 existing_user_controller()->CompleteLogin(kNewUsername, kPassword);
286 ui_test_utils::RunAllPendingInMessageLoop(); 289 ui_test_utils::RunAllPendingInMessageLoop();
287 } 290 }
288 291
289 } // namespace chromeos 292 } // namespace chromeos
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/chromeos/login/login_browsertest.cc » ('j') | chrome/browser/chromeos/login/login_browsertest.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698