diff options
author | Torne (Richard Coles) <torne@google.com> | 2014-03-18 10:20:56 +0000 |
---|---|---|
committer | Torne (Richard Coles) <torne@google.com> | 2014-03-18 10:20:56 +0000 |
commit | a1401311d1ab56c4ed0a474bd38c108f75cb0cd9 (patch) | |
tree | 3437151d9ae1ce20a1e53a0d98c19ca01c786394 /chrome/browser/sync/test/integration/sync_auth_test.cc | |
parent | af5066f1e36c6579e74752647e6c584438f80f94 (diff) | |
download | chromium_org-a1401311d1ab56c4ed0a474bd38c108f75cb0cd9.tar.gz |
Merge from Chromium at DEPS revision 257591
This commit was generated by merge_to_master.py.
Change-Id: I0010df2ec3fbb5d4947cd026de2feb150ce7a6b5
Diffstat (limited to 'chrome/browser/sync/test/integration/sync_auth_test.cc')
-rw-r--r-- | chrome/browser/sync/test/integration/sync_auth_test.cc | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/chrome/browser/sync/test/integration/sync_auth_test.cc b/chrome/browser/sync/test/integration/sync_auth_test.cc index a943a94632..2c543c14ba 100644 --- a/chrome/browser/sync/test/integration/sync_auth_test.cc +++ b/chrome/browser/sync/test/integration/sync_auth_test.cc @@ -10,7 +10,7 @@ #include "chrome/browser/sync/profile_sync_service.h" #include "chrome/browser/sync/test/integration/bookmarks_helper.h" #include "chrome/browser/sync/test/integration/profile_sync_service_harness.h" -#include "chrome/browser/sync/test/integration/status_change_checker.h" +#include "chrome/browser/sync/test/integration/single_client_status_change_checker.h" #include "chrome/browser/sync/test/integration/sync_test.h" #include "google_apis/gaia/google_service_auth_error.h" #include "net/http/http_status_code.h" @@ -45,27 +45,29 @@ const char kEmptyOAuth2Token[] = ""; const char kMalformedOAuth2Token[] = "{ \"foo\": "; -class TestForAuthError : public StatusChangeChecker { +class TestForAuthError : public SingleClientStatusChangeChecker { public: explicit TestForAuthError(ProfileSyncService* service); virtual ~TestForAuthError(); virtual bool IsExitConditionSatisfied() OVERRIDE; - - private: - ProfileSyncService* service_; + virtual std::string GetDebugMessage() const OVERRIDE; }; TestForAuthError::TestForAuthError(ProfileSyncService* service) - : StatusChangeChecker("Testing for auth error"), service_(service) {} + : SingleClientStatusChangeChecker(service) {} TestForAuthError::~TestForAuthError() {} bool TestForAuthError::IsExitConditionSatisfied() { - return !service_->HasUnsyncedItems() || - (service_->GetSyncTokenStatus().last_get_token_error.state() != + return !service()->HasUnsyncedItems() || + (service()->GetSyncTokenStatus().last_get_token_error.state() != GoogleServiceAuthError::NONE); } +std::string TestForAuthError::GetDebugMessage() const { + return "Waiting for auth error"; +} + class SyncAuthTest : public SyncTest { public: SyncAuthTest() : SyncTest(SINGLE_CLIENT), bookmark_index_(0) {} @@ -82,7 +84,7 @@ class SyncAuthTest : public SyncTest { // Run until the bookmark is committed or an auth error is encountered. TestForAuthError checker_(GetClient(0)->service()); - GetClient(0)->AwaitStatusChange(&checker_, "Attempt to trigger auth error"); + GetClient(0)->AwaitStatusChange(&checker_); GoogleServiceAuthError oauth_error = GetClient(0)->service()->GetSyncTokenStatus().last_get_token_error; |