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