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 "chrome/browser/signin/signin_tracker.h" | 5 #include "chrome/browser/signin/signin_tracker.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/bind_helpers.h" | 8 #include "base/bind_helpers.h" |
9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
10 #include "chrome/browser/profiles/profile.h" | 10 #include "chrome/browser/profiles/profile.h" |
(...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
267 // Now mimic an auth error - this should cause us to fail (not waiting for | 267 // Now mimic an auth error - this should cause us to fail (not waiting for |
268 // auth, but still have no credentials). | 268 // auth, but still have no credentials). |
269 GoogleServiceAuthError error( | 269 GoogleServiceAuthError error( |
270 GoogleServiceAuthError::INVALID_GAIA_CREDENTIALS); | 270 GoogleServiceAuthError::INVALID_GAIA_CREDENTIALS); |
271 EXPECT_CALL(*mock_pss_, GetAuthError()).WillRepeatedly(ReturnRef(error)); | 271 EXPECT_CALL(*mock_pss_, GetAuthError()).WillRepeatedly(ReturnRef(error)); |
272 EXPECT_CALL(*mock_pss_, waiting_for_auth()).WillOnce(Return(false)); | 272 EXPECT_CALL(*mock_pss_, waiting_for_auth()).WillOnce(Return(false)); |
273 EXPECT_CALL(observer_, SigninFailed(error)); | 273 EXPECT_CALL(observer_, SigninFailed(error)); |
274 tracker_->OnStateChanged(); | 274 tracker_->OnStateChanged(); |
275 } | 275 } |
276 | 276 |
| 277 // TODO(kochi) Add tests with initial state != WATIING_FOR_GAIA_VALIDATION. |
OLD | NEW |