| Index: chrome/test/live_sync/migration_errors_test.cc
|
| diff --git a/chrome/test/live_sync/migration_errors_test.cc b/chrome/test/live_sync/migration_errors_test.cc
|
| index 0ea11878364852e260c6c5d37d8da23ea49f523a..0b5e96d1600c7a3bd49d824c16cda465750f2cc5 100644
|
| --- a/chrome/test/live_sync/migration_errors_test.cc
|
| +++ b/chrome/test/live_sync/migration_errors_test.cc
|
| @@ -32,15 +32,16 @@ class MigrationCycleTest : public LiveSyncTest {
|
| };
|
|
|
| IN_PROC_BROWSER_TEST_F(MigrationCycleTest, PrefsOnly) {
|
| - if (!ServerSupportsErrorTriggering()) {
|
| + if (!ServerSupportsNotificationControl() ||
|
| + !ServerSupportsErrorTriggering()) {
|
| LOG(WARNING) << "Test skipped in this server environment.";
|
| return;
|
| }
|
|
|
| - DisableNotifications();
|
| -
|
| ASSERT_TRUE(SetupSync()) << "SetupSync() failed.";
|
|
|
| + DisableNotifications();
|
| +
|
| // Phase 1: Trigger a preference migration on the server.
|
| syncable::ModelTypeSet migrate_types;
|
| migrate_types.insert(syncable::PREFERENCES);
|
| @@ -56,16 +57,41 @@ IN_PROC_BROWSER_TEST_F(MigrationCycleTest, PrefsOnly) {
|
| }
|
|
|
| // TODO(akalin): Fails due to http://crbug.com/92928.
|
| -IN_PROC_BROWSER_TEST_F(MigrationCycleTest, FAILS_PrefsNigori) {
|
| - if (!ServerSupportsErrorTriggering()) {
|
| +IN_PROC_BROWSER_TEST_F(MigrationCycleTest,
|
| + FAILS_PrefsOnlyTriggerNotification) {
|
| + if (!ServerSupportsNotificationControl() ||
|
| + !ServerSupportsErrorTriggering()) {
|
| LOG(WARNING) << "Test skipped in this server environment.";
|
| return;
|
| }
|
|
|
| - DisableNotifications();
|
| + ASSERT_TRUE(SetupSync()) << "SetupSync() failed.";
|
| +
|
| + // Phase 1: Trigger a preference migration on the server.
|
| + syncable::ModelTypeSet migrate_types;
|
| + migrate_types.insert(syncable::PREFERENCES);
|
| + TriggerMigrationDoneError(migrate_types);
|
| +
|
| + // Phase 2: Synthesize a notification (to trigger migration) and
|
| + // wait for a sync cycle.
|
| + // TODO(akalin): Shouldn't need to wait for full sync cycle; see
|
| + // 93167.
|
| + TriggerNotification(migrate_types);
|
| + ASSERT_TRUE(GetClient(0)->AwaitNextSyncCycleCompletion("Migration"));
|
| +}
|
| +
|
| +// TODO(akalin): Fails due to http://crbug.com/92928.
|
| +IN_PROC_BROWSER_TEST_F(MigrationCycleTest, FAILS_PrefsNigori) {
|
| + if (!ServerSupportsNotificationControl() ||
|
| + !ServerSupportsErrorTriggering()) {
|
| + LOG(WARNING) << "Test skipped in this server environment.";
|
| + return;
|
| + }
|
|
|
| ASSERT_TRUE(SetupSync()) << "SetupSync() failed.";
|
|
|
| + DisableNotifications();
|
| +
|
| // Phase 1: Trigger a preference and nigori migration on the server.
|
| {
|
| syncable::ModelTypeSet migrate_types;
|
| @@ -89,15 +115,16 @@ IN_PROC_BROWSER_TEST_F(MigrationCycleTest, FAILS_PrefsNigori) {
|
|
|
| // TODO(akalin): Fails due to http://crbug.com/92928.
|
| IN_PROC_BROWSER_TEST_F(MigrationCycleTest, FAILS_BookmarksPrefs) {
|
| - if (!ServerSupportsErrorTriggering()) {
|
| + if (!ServerSupportsNotificationControl() ||
|
| + !ServerSupportsErrorTriggering()) {
|
| LOG(WARNING) << "Test skipped in this server environment.";
|
| return;
|
| }
|
|
|
| - DisableNotifications();
|
| -
|
| ASSERT_TRUE(SetupSync()) << "SetupSync() failed.";
|
|
|
| + DisableNotifications();
|
| +
|
| // Phase 1: Trigger a bookmark and preference migration on the
|
| // server.
|
| {
|
| @@ -119,8 +146,7 @@ IN_PROC_BROWSER_TEST_F(MigrationCycleTest, FAILS_BookmarksPrefs) {
|
| ASSERT_TRUE(GetClient(0)->AwaitSyncCycleCompletion("Migration"));
|
| }
|
|
|
| -// TODO(akalin): Add tests where the migration trigger is a poll or a
|
| -// nudge from notifications.
|
| +// TODO(akalin): Add tests where the migration trigger is a poll.
|
|
|
| class MigrationErrorsTest : public LiveSyncTest {
|
| public:
|
|
|