summaryrefslogtreecommitdiffstats
path: root/chrome/browser/sync/profile_sync_service_harness.cc
diff options
context:
space:
mode:
authorrsimha@chromium.org <rsimha@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-11-07 19:02:47 +0000
committerrsimha@chromium.org <rsimha@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-11-07 19:02:47 +0000
commit7a6f7ba5153d263368cb9178a508c7262a2b0b76 (patch)
tree70631079380d25bbf2b8085ad3ffe887b43647e5 /chrome/browser/sync/profile_sync_service_harness.cc
parentb5ae34e368311d23b0dd615bfeb88ab1ec2d4af7 (diff)
downloadchromium_src-7a6f7ba5153d263368cb9178a508c7262a2b0b76.zip
chromium_src-7a6f7ba5153d263368cb9178a508c7262a2b0b76.tar.gz
chromium_src-7a6f7ba5153d263368cb9178a508c7262a2b0b76.tar.bz2
[sync] Infrastructure for auth error integration tests
This CL adds infrastructure for writing sync integration tests for various scenarios involving OAuth2 token fetches, along with a sanity test. More tests for specific auth error conditions will be added in a later CL. BUG=311411 TEST=sync_integration_tests:SyncAuthTest.Sanity R=pavely@chromium.org, tim@chromium.org Review URL: https://codereview.chromium.org/55293004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@233648 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/sync/profile_sync_service_harness.cc')
-rw-r--r--chrome/browser/sync/profile_sync_service_harness.cc6
1 files changed, 6 insertions, 0 deletions
diff --git a/chrome/browser/sync/profile_sync_service_harness.cc b/chrome/browser/sync/profile_sync_service_harness.cc
index 800d1bb..f90f791 100644
--- a/chrome/browser/sync/profile_sync_service_harness.cc
+++ b/chrome/browser/sync/profile_sync_service_harness.cc
@@ -349,6 +349,12 @@ bool ProfileSyncServiceHarness::RunStateChangeMachine() {
}
case WAITING_FOR_FULL_SYNC: {
DVLOG(1) << GetClientInfoString("WAITING_FOR_FULL_SYNC");
+ if (service()->GetAuthError().state() ==
+ GoogleServiceAuthError::INVALID_GAIA_CREDENTIALS) {
+ // Our credentials were rejected. Do not wait any more.
+ SignalStateCompleteWithNextState(CREDENTIALS_REJECTED);
+ break;
+ }
if (IsFullySynced()) {
// The sync cycle we were waiting for is complete.
SignalStateCompleteWithNextState(FULLY_SYNCED);