| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 "testing/gtest/include/gtest/gtest.h" | 5 #include "testing/gtest/include/gtest/gtest.h" |
| 6 | 6 |
| 7 #include "base/message_loop.h" | 7 #include "base/message_loop.h" |
| 8 #include "base/scoped_ptr.h" | 8 #include "base/scoped_ptr.h" |
| 9 #include "chrome/browser/chrome_thread.h" | 9 #include "chrome/browser/chrome_thread.h" |
| 10 #include "chrome/browser/net/gaia/token_service.h" | 10 #include "chrome/browser/net/gaia/token_service.h" |
| (...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 196 WillOnce(Return(DataTypeManager::CONFIGURED)); | 196 WillOnce(Return(DataTypeManager::CONFIGURED)); |
| 197 EXPECT_CALL(*data_type_manager, Stop()).Times(1); | 197 EXPECT_CALL(*data_type_manager, Stop()).Times(1); |
| 198 EXPECT_CALL(observer_, OnStateChanged()).Times(4); | 198 EXPECT_CALL(observer_, OnStateChanged()).Times(4); |
| 199 | 199 |
| 200 profile_.GetPrefs()->ClearPref(prefs::kSyncHasSetupCompleted); | 200 profile_.GetPrefs()->ClearPref(prefs::kSyncHasSetupCompleted); |
| 201 | 201 |
| 202 // Pretend the login screen worked. | 202 // Pretend the login screen worked. |
| 203 GaiaAuthConsumer::ClientLoginResult result; | 203 GaiaAuthConsumer::ClientLoginResult result; |
| 204 result.sid = "sid"; | 204 result.sid = "sid"; |
| 205 result.lsid = "lsid"; | 205 result.lsid = "lsid"; |
| 206 profile_.GetTokenService()->SetClientLoginResult(result); | 206 profile_.GetTokenService()->Initialize("test", |
| 207 profile_.GetRequestContext(), |
| 208 result); |
| 209 |
| 207 // Will start sync even though setup hasn't been completed (since | 210 // Will start sync even though setup hasn't been completed (since |
| 208 // setup is bypassed when bootstrapping is enabled). | 211 // setup is bypassed when bootstrapping is enabled). |
| 209 service_->Initialize(); | 212 service_->Initialize(); |
| 210 } | 213 } |
| OLD | NEW |