-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Copyright 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#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/sync_test.h"
-#include "chrome/browser/translate/translate_prefs.h"
#include "chrome/common/pref_names.h"
#include "chrome/test/base/ui_test_utils.h"
+#include "components/translate/core/browser/translate_prefs.h"
using bookmarks_helper::AddURL;
using bookmarks_helper::IndexedURL;
" does not contain ")
<< syncer::ModelTypeSetToString(expected_types_);
return all_expected_types_migrated &&
- !harness_->HasPendingBackendMigration();
+ !HasPendingBackendMigration();
+ }
+
+ bool HasPendingBackendMigration() const {
+ browser_sync::BackendMigrator* migrator =
+ harness_->service()->GetBackendMigratorForTest();
+ return migrator && migrator->state() != browser_sync::BackendMigrator::IDLE;
}
void set_expected_types(syncer::ModelTypeSet expected_types) {
}
virtual void OnMigrationStateChange() OVERRIDE {
- if (harness_->HasPendingBackendMigration()) {
+ if (HasPendingBackendMigration()) {
// A new bunch of data types are in the process of being migrated. Merge
// them into |pending_types_|.
pending_types_.PutAll(
checker->set_expected_types(migrate_types);
if (!checker->IsExitConditionSatisfied())
ASSERT_TRUE(GetClient(i)->AwaitStatusChange(checker, "AwaitMigration"));
- // We must use AwaitDataSyncCompletion rather than the more common
- // AwaitFullSyncCompletion. As long as crbug.com/97780 is open, we will
- // rely on self-notifications to ensure that progress markers are updated,
- // which allows AwaitFullSyncCompletion to return. However, in some
- // migration tests these notifications are completely disabled, so the
- // progress markers do not get updated. This is why we must use the less
- // strict condition, AwaitDataSyncCompletion.
- ASSERT_TRUE(GetClient(i)->AwaitDataSyncCompletion());
}
}