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

Unified Diff: chrome/test/live_sync/profile_sync_service_test_harness.cc

Issue 3160002: Error reporting for sync setup failure. (Closed)
Patch Set: Created 10 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/test/live_sync/live_sync_test.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/live_sync/profile_sync_service_test_harness.cc
diff --git a/chrome/test/live_sync/profile_sync_service_test_harness.cc b/chrome/test/live_sync/profile_sync_service_test_harness.cc
index 081b0d85440a16efed06faf505a5cc08b152f64a..34646105cf71c3744f4ef2103b3137d87b074751 100644
--- a/chrome/test/live_sync/profile_sync_service_test_harness.cc
+++ b/chrome/test/live_sync/profile_sync_service_test_harness.cc
@@ -259,18 +259,16 @@ bool ProfileSyncServiceTestHarness::AwaitStatusChangeWithTimeout(
bool ProfileSyncServiceTestHarness::WaitForServiceInit() {
// Wait for the OnAuthError() callback.
EXPECT_EQ(wait_state_, WAITING_FOR_ON_AUTH_ERROR);
- if (!AwaitStatusChangeWithTimeout(30,
- "Waiting for the OnAuthError() callback.")) {
- return false;
- }
+ EXPECT_TRUE(AwaitStatusChangeWithTimeout(30,
+ "Waiting for the OnAuthError() callback.")) <<
+ "OnAuthError() not seen after 30 seconds.";
// Enter GAIA credentials and wait for the OnBackendInitialized() callback.
service_->backend()->Authenticate(username_, password_, std::string());
EXPECT_EQ(wait_state_, WAITING_FOR_ON_BACKEND_INITIALIZED);
- if (!AwaitStatusChangeWithTimeout(30,
- "Waiting for OnBackendInitialized().")) {
- return false;
- }
+ EXPECT_TRUE(AwaitStatusChangeWithTimeout(30,
+ "Waiting for OnBackendInitialized().")) <<
+ "OnBackendInitialized() not seen after 30 seconds.";
// Choose datatypes to be synced and wait for notifications_enabled to be set
// to true.
@@ -281,10 +279,9 @@ bool ProfileSyncServiceTestHarness::WaitForServiceInit() {
}
service_->OnUserChoseDatatypes(true, set);
EXPECT_EQ(wait_state_, WAITING_FOR_NOTIFICATIONS_ENABLED);
- if (!AwaitStatusChangeWithTimeout(30,
- "Waiting for notifications_enabled to be set to true.")) {
- return false;
- }
+ EXPECT_TRUE(AwaitStatusChangeWithTimeout(30,
+ "Waiting for notifications_enabled to be set to true.")) <<
+ "notifications_enabled not set to true after 30 seconds.";
return true;
}
« no previous file with comments | « chrome/test/live_sync/live_sync_test.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698