OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 252 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
263 MODIFY_PREF); | 263 MODIFY_PREF); |
264 } | 264 } |
265 | 265 |
266 // The whole shebang -- all data types. | 266 // The whole shebang -- all data types. |
267 | 267 |
268 IN_PROC_BROWSER_TEST_F(MigrationSingleClientTest, AllTypesIndividually) { | 268 IN_PROC_BROWSER_TEST_F(MigrationSingleClientTest, AllTypesIndividually) { |
269 ASSERT_TRUE(SetupClients()); | 269 ASSERT_TRUE(SetupClients()); |
270 RunSingleClientMigrationTest(GetPreferredDataTypesList(), MODIFY_BOOKMARK); | 270 RunSingleClientMigrationTest(GetPreferredDataTypesList(), MODIFY_BOOKMARK); |
271 } | 271 } |
272 | 272 |
| 273 // This test is crashing on Win and Linux sync bots. http://crbug.com/107743 |
273 IN_PROC_BROWSER_TEST_F(MigrationSingleClientTest, | 274 IN_PROC_BROWSER_TEST_F(MigrationSingleClientTest, |
274 AllTypesIndividuallyTriggerNotification) { | 275 DISABLED_AllTypesIndividuallyTriggerNotification) { |
275 ASSERT_TRUE(SetupClients()); | 276 ASSERT_TRUE(SetupClients()); |
276 RunSingleClientMigrationTest(GetPreferredDataTypesList(), | 277 RunSingleClientMigrationTest(GetPreferredDataTypesList(), |
277 TRIGGER_NOTIFICATION); | 278 TRIGGER_NOTIFICATION); |
278 } | 279 } |
279 | 280 |
280 IN_PROC_BROWSER_TEST_F(MigrationSingleClientTest, AllTypesAtOnce) { | 281 IN_PROC_BROWSER_TEST_F(MigrationSingleClientTest, AllTypesAtOnce) { |
281 ASSERT_TRUE(SetupClients()); | 282 ASSERT_TRUE(SetupClients()); |
282 RunSingleClientMigrationTest(MakeList(GetPreferredDataTypes()), | 283 RunSingleClientMigrationTest(MakeList(GetPreferredDataTypes()), |
283 MODIFY_PREF); | 284 MODIFY_PREF); |
284 } | 285 } |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
351 | 352 |
352 // Triggers a server migration on two datatypes, then makes a local | 353 // Triggers a server migration on two datatypes, then makes a local |
353 // modification to one of them. | 354 // modification to one of them. |
354 IN_PROC_BROWSER_TEST_F(MigrationTwoClientTest, | 355 IN_PROC_BROWSER_TEST_F(MigrationTwoClientTest, |
355 MigratePrefsAndBookmarksThenModifyBookmark) { | 356 MigratePrefsAndBookmarksThenModifyBookmark) { |
356 RunTwoClientMigrationTest( | 357 RunTwoClientMigrationTest( |
357 MakeList(syncable::PREFERENCES, syncable::BOOKMARKS), | 358 MakeList(syncable::PREFERENCES, syncable::BOOKMARKS), |
358 MODIFY_BOOKMARK); | 359 MODIFY_BOOKMARK); |
359 } | 360 } |
360 | 361 |
| 362 // Flaky on Mac 10.6 Sync bot and crashes on Win7 sync bot: |
| 363 // http://crbug.com/107205. |
361 // Migrate every datatype in sequence; the catch being that the server | 364 // Migrate every datatype in sequence; the catch being that the server |
362 // will only tell the client about the migrations one at a time. | 365 // will only tell the client about the migrations one at a time. |
363 IN_PROC_BROWSER_TEST_F(MigrationTwoClientTest, MigrationHellWithoutNigori) { | 366 IN_PROC_BROWSER_TEST_F(MigrationTwoClientTest, |
| 367 DISABLED_MigrationHellWithoutNigori) { |
364 ASSERT_TRUE(SetupClients()); | 368 ASSERT_TRUE(SetupClients()); |
365 MigrationList migration_list = GetPreferredDataTypesList(); | 369 MigrationList migration_list = GetPreferredDataTypesList(); |
366 // Let the first nudge be a datatype that's neither prefs nor | 370 // Let the first nudge be a datatype that's neither prefs nor |
367 // bookmarks. | 371 // bookmarks. |
368 migration_list.push_front(MakeSet(syncable::THEMES)); | 372 migration_list.push_front(MakeSet(syncable::THEMES)); |
369 RunTwoClientMigrationTest(migration_list, MODIFY_BOOKMARK); | 373 RunTwoClientMigrationTest(migration_list, MODIFY_BOOKMARK); |
370 } | 374 } |
371 | 375 |
372 IN_PROC_BROWSER_TEST_F(MigrationTwoClientTest, MigrationHellWithNigori) { | 376 // Flaky on Mac 10.6 Sync bot and crashes on Win7 sync bot: |
| 377 // http://crbug.com/107205. |
| 378 IN_PROC_BROWSER_TEST_F(MigrationTwoClientTest, |
| 379 DISABLED_MigrationHellWithNigori) { |
373 ASSERT_TRUE(SetupClients()); | 380 ASSERT_TRUE(SetupClients()); |
374 MigrationList migration_list = GetPreferredDataTypesList(); | 381 MigrationList migration_list = GetPreferredDataTypesList(); |
375 // Let the first nudge be a datatype that's neither prefs nor | 382 // Let the first nudge be a datatype that's neither prefs nor |
376 // bookmarks. | 383 // bookmarks. |
377 migration_list.push_front(MakeSet(syncable::THEMES)); | 384 migration_list.push_front(MakeSet(syncable::THEMES)); |
378 // Pop off one so that we don't migrate all data types; the syncer | 385 // Pop off one so that we don't migrate all data types; the syncer |
379 // freaks out if we do that (see http://crbug.com/94882). | 386 // freaks out if we do that (see http://crbug.com/94882). |
380 ASSERT_GE(migration_list.size(), 2u); | 387 ASSERT_GE(migration_list.size(), 2u); |
381 ASSERT_FALSE(migration_list.back().Equals(MakeSet(syncable::NIGORI))); | 388 ASSERT_FALSE(migration_list.back().Equals(MakeSet(syncable::NIGORI))); |
382 migration_list.back() = MakeSet(syncable::NIGORI); | 389 migration_list.back() = MakeSet(syncable::NIGORI); |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
447 | 454 |
448 // Phase 5: Verify that preferences can still be synchronized. | 455 // Phase 5: Verify that preferences can still be synchronized. |
449 VerifyPrefSync(); | 456 VerifyPrefSync(); |
450 | 457 |
451 // Phase 6: Verify that sessions are registered and enabled. | 458 // Phase 6: Verify that sessions are registered and enabled. |
452 ASSERT_TRUE(GetClient(0)->IsTypeRunning(syncable::SESSIONS)); | 459 ASSERT_TRUE(GetClient(0)->IsTypeRunning(syncable::SESSIONS)); |
453 ASSERT_TRUE(GetClient(0)->IsTypePreferred(syncable::SESSIONS)); | 460 ASSERT_TRUE(GetClient(0)->IsTypePreferred(syncable::SESSIONS)); |
454 } | 461 } |
455 | 462 |
456 } // namespace | 463 } // namespace |
OLD | NEW |