| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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/message_loop.h" | 5 #include "base/message_loop.h" |
| 6 #include "chrome/browser/browser.h" | 6 #include "chrome/browser/browser.h" |
| 7 #include "chrome/browser/tab_contents/tab_contents.h" | 7 #include "chrome/browser/tab_contents/tab_contents.h" |
| 8 #include "chrome/common/pref_names.h" | 8 #include "chrome/common/pref_names.h" |
| 9 #include "chrome/common/pref_service.h" | 9 #include "chrome/common/pref_service.h" |
| 10 #include "chrome/test/live_sync/profile_sync_service_test_harness.h" | 10 #include "chrome/test/live_sync/profile_sync_service_test_harness.h" |
| (...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 238 } | 238 } |
| 239 | 239 |
| 240 bool ProfileSyncServiceTestHarness::WaitForServiceInit() { | 240 bool ProfileSyncServiceTestHarness::WaitForServiceInit() { |
| 241 // Wait for the initial (auth needed) callback. | 241 // Wait for the initial (auth needed) callback. |
| 242 EXPECT_EQ(wait_state_, WAITING_FOR_INITIAL_CALLBACK); | 242 EXPECT_EQ(wait_state_, WAITING_FOR_INITIAL_CALLBACK); |
| 243 if (!AwaitStatusChangeWithTimeout(30, "Waiting for authwatcher calback.")) { | 243 if (!AwaitStatusChangeWithTimeout(30, "Waiting for authwatcher calback.")) { |
| 244 return false; | 244 return false; |
| 245 } | 245 } |
| 246 | 246 |
| 247 // Wait for the OnBackendInitialized callback. | 247 // Wait for the OnBackendInitialized callback. |
| 248 service_->backend()->Authenticate(username_, password_); | 248 service_->backend()->Authenticate(username_, password_, std::string()); |
| 249 EXPECT_EQ(wait_state_, WAITING_FOR_READY_TO_PROCESS_CHANGES); | 249 EXPECT_EQ(wait_state_, WAITING_FOR_READY_TO_PROCESS_CHANGES); |
| 250 if (!AwaitStatusChangeWithTimeout(30, "Waiting on backend initialization.")) { | 250 if (!AwaitStatusChangeWithTimeout(30, "Waiting on backend initialization.")) { |
| 251 return false; | 251 return false; |
| 252 } | 252 } |
| 253 return service_->sync_initialized(); | 253 return service_->sync_initialized(); |
| 254 } | 254 } |
| OLD | NEW |