| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 // TODO(akalin): Rename this file to migration_test.cc. | 5 // TODO(akalin): Rename this file to migration_test.cc. |
| 6 | 6 |
| 7 #include "base/compiler_specific.h" | 7 #include "base/compiler_specific.h" |
| 8 #include "chrome/browser/prefs/scoped_user_pref_update.h" | 8 #include "chrome/browser/prefs/scoped_user_pref_update.h" |
| 9 #include "chrome/browser/profiles/profile.h" | 9 #include "chrome/browser/profiles/profile.h" |
| 10 #include "chrome/browser/sync/profile_sync_service_harness.h" | 10 #include "chrome/browser/sync/profile_sync_service_harness.h" |
| (...skipping 333 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 344 // Triggers a server migration on two datatypes, then makes a local | 344 // Triggers a server migration on two datatypes, then makes a local |
| 345 // modification to one of them. | 345 // modification to one of them. |
| 346 // Flaky. crbug.com/100382. | 346 // Flaky. crbug.com/100382. |
| 347 IN_PROC_BROWSER_TEST_F(MigrationTwoClientTest, | 347 IN_PROC_BROWSER_TEST_F(MigrationTwoClientTest, |
| 348 FLAKY_MigratePrefsAndBookmarksThenModifyBookmark) { | 348 FLAKY_MigratePrefsAndBookmarksThenModifyBookmark) { |
| 349 RunTwoClientMigrationTest( | 349 RunTwoClientMigrationTest( |
| 350 MakeList(syncable::PREFERENCES, syncable::BOOKMARKS), | 350 MakeList(syncable::PREFERENCES, syncable::BOOKMARKS), |
| 351 MODIFY_BOOKMARK); | 351 MODIFY_BOOKMARK); |
| 352 } | 352 } |
| 353 | 353 |
| 354 // Flaky on Mac 10.6 Sync bot: http://crbug.com/107205. | 354 // Flaky on Mac 10.6 Sync bot and crashes on Win7 sync bot: |
| 355 #if defined(OS_MACOSX) | 355 // http://crbug.com/107205. |
| 356 #define MAYBE_MigrationHellWithoutNigori FLAKY_MigrationHellWithoutNigori | |
| 357 #else | |
| 358 #define MAYBE_MigrationHellWithoutNigori MigrationHellWithoutNigori | |
| 359 #endif | |
| 360 | |
| 361 // Migrate every datatype in sequence; the catch being that the server | 356 // Migrate every datatype in sequence; the catch being that the server |
| 362 // will only tell the client about the migrations one at a time. | 357 // will only tell the client about the migrations one at a time. |
| 363 IN_PROC_BROWSER_TEST_F(MigrationTwoClientTest, | 358 IN_PROC_BROWSER_TEST_F(MigrationTwoClientTest, |
| 364 MAYBE_MigrationHellWithoutNigori) { | 359 DISABLED_MigrationHellWithoutNigori) { |
| 365 ASSERT_TRUE(SetupClients()); | 360 ASSERT_TRUE(SetupClients()); |
| 366 MigrationList migration_list = GetPreferredDataTypesList(); | 361 MigrationList migration_list = GetPreferredDataTypesList(); |
| 367 // Let the first nudge be a datatype that's neither prefs nor | 362 // Let the first nudge be a datatype that's neither prefs nor |
| 368 // bookmarks. | 363 // bookmarks. |
| 369 migration_list.push_front(MakeSet(syncable::THEMES)); | 364 migration_list.push_front(MakeSet(syncable::THEMES)); |
| 370 RunTwoClientMigrationTest(migration_list, MODIFY_BOOKMARK); | 365 RunTwoClientMigrationTest(migration_list, MODIFY_BOOKMARK); |
| 371 } | 366 } |
| 372 | 367 |
| 373 IN_PROC_BROWSER_TEST_F(MigrationTwoClientTest, MigrationHellWithNigori) { | 368 // Flaky on Mac 10.6 Sync bot and crashes on Win7 sync bot: |
| 369 // http://crbug.com/107205. |
| 370 IN_PROC_BROWSER_TEST_F(MigrationTwoClientTest, |
| 371 DISABLED_MigrationHellWithNigori) { |
| 374 ASSERT_TRUE(SetupClients()); | 372 ASSERT_TRUE(SetupClients()); |
| 375 MigrationList migration_list = GetPreferredDataTypesList(); | 373 MigrationList migration_list = GetPreferredDataTypesList(); |
| 376 // Let the first nudge be a datatype that's neither prefs nor | 374 // Let the first nudge be a datatype that's neither prefs nor |
| 377 // bookmarks. | 375 // bookmarks. |
| 378 migration_list.push_front(MakeSet(syncable::THEMES)); | 376 migration_list.push_front(MakeSet(syncable::THEMES)); |
| 379 // Pop off one so that we don't migrate all data types; the syncer | 377 // Pop off one so that we don't migrate all data types; the syncer |
| 380 // freaks out if we do that (see http://crbug.com/94882). | 378 // freaks out if we do that (see http://crbug.com/94882). |
| 381 ASSERT_GE(migration_list.size(), 2u); | 379 ASSERT_GE(migration_list.size(), 2u); |
| 382 ASSERT_FALSE(migration_list.back().Equals(MakeSet(syncable::NIGORI))); | 380 ASSERT_FALSE(migration_list.back().Equals(MakeSet(syncable::NIGORI))); |
| 383 migration_list.back() = MakeSet(syncable::NIGORI); | 381 migration_list.back() = MakeSet(syncable::NIGORI); |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 449 | 447 |
| 450 // Phase 5: Verify that preferences can still be synchronized. | 448 // Phase 5: Verify that preferences can still be synchronized. |
| 451 VerifyPrefSync(); | 449 VerifyPrefSync(); |
| 452 | 450 |
| 453 // Phase 6: Verify that sessions are registered and enabled. | 451 // Phase 6: Verify that sessions are registered and enabled. |
| 454 ASSERT_TRUE(GetClient(0)->IsTypeRunning(syncable::SESSIONS)); | 452 ASSERT_TRUE(GetClient(0)->IsTypeRunning(syncable::SESSIONS)); |
| 455 ASSERT_TRUE(GetClient(0)->IsTypePreferred(syncable::SESSIONS)); | 453 ASSERT_TRUE(GetClient(0)->IsTypePreferred(syncable::SESSIONS)); |
| 456 } | 454 } |
| 457 | 455 |
| 458 } // namespace | 456 } // namespace |
| OLD | NEW |