| Index: chrome/browser/sync/test/integration/migration_test.cc
|
| diff --git a/chrome/browser/sync/test/integration/migration_test.cc b/chrome/browser/sync/test/integration/migration_test.cc
|
| index a63d0d45be82aad06a96a949b7b4fa23cc1de094..5460f484b2810226776f3876e72a93ea67905375 100644
|
| --- a/chrome/browser/sync/test/integration/migration_test.cc
|
| +++ b/chrome/browser/sync/test/integration/migration_test.cc
|
| @@ -10,7 +10,7 @@
|
| #include "chrome/browser/sync/test/integration/bookmarks_helper.h"
|
| #include "chrome/browser/sync/test/integration/preferences_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 "chrome/browser/translate/translate_prefs.h"
|
| #include "chrome/common/pref_names.h"
|
| @@ -67,11 +67,11 @@ MigrationList MakeList(syncer::ModelType type1,
|
|
|
| // Helper class that checks if the sync backend has successfully completed
|
| // migration for a set of data types.
|
| -class MigrationChecker : public StatusChangeChecker,
|
| +class MigrationChecker : public SingleClientStatusChangeChecker,
|
| public browser_sync::MigrationObserver {
|
| public:
|
| explicit MigrationChecker(ProfileSyncServiceHarness* harness)
|
| - : StatusChangeChecker("MigrationChecker"),
|
| + : SingleClientStatusChangeChecker(harness->service()),
|
| harness_(harness) {
|
| DCHECK(harness_);
|
| browser_sync::BackendMigrator* migrator =
|
| @@ -98,6 +98,10 @@ class MigrationChecker : public StatusChangeChecker,
|
| !HasPendingBackendMigration();
|
| }
|
|
|
| + virtual std::string GetDebugMessage() const OVERRIDE {
|
| + return "Waiting to migrate (" + ModelTypeSetToString(expected_types_) + ")";
|
| + }
|
| +
|
| bool HasPendingBackendMigration() const {
|
| browser_sync::BackendMigrator* migrator =
|
| harness_->service()->GetBackendMigratorForTest();
|
| @@ -131,9 +135,13 @@ class MigrationChecker : public StatusChangeChecker,
|
| << syncer::ModelTypeSetToString(migrated_types_);
|
| }
|
|
|
| +#if 0
|
| // Nudge ProfileSyncServiceHarness to inspect the exit condition provided by
|
| // AwaitMigration.
|
| - harness_->OnStateChanged();
|
| + if (IsWaiting() && IsExitConditionSatisfied()) {
|
| + StopWaitingAndSucceed();
|
| + }
|
| +#endif
|
| }
|
|
|
| private:
|
| @@ -234,7 +242,7 @@ class MigrationTest : public SyncTest {
|
| MigrationChecker* checker = migration_checkers_[i];
|
| checker->set_expected_types(migrate_types);
|
| if (!checker->IsExitConditionSatisfied())
|
| - ASSERT_TRUE(GetClient(i)->AwaitStatusChange(checker, "AwaitMigration"));
|
| + ASSERT_TRUE(GetClient(i)->AwaitStatusChange(checker));
|
| }
|
| }
|
|
|
|
|