OLD | NEW |
1 // Copyright (c) 2006-2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2009 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 #include <stdlib.h> | 5 #include <stdlib.h> |
6 #include <string> | 6 #include <string> |
7 | 7 |
8 #include "base/file_path.h" | 8 #include "base/file_path.h" |
9 #include "base/rand_util.h" | 9 #include "base/rand_util.h" |
10 #include "chrome/browser/bookmarks/bookmark_model.h" | 10 #include "chrome/browser/bookmarks/bookmark_model.h" |
(...skipping 392 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
403 const BookmarkNode* google_one = bbn_one->GetChild(0); | 403 const BookmarkNode* google_one = bbn_one->GetChild(0); |
404 model_one->SetTitle(google_one, L"Google1"); | 404 model_one->SetTitle(google_one, L"Google1"); |
405 } | 405 } |
406 ASSERT_TRUE(client1()->AwaitMutualSyncCycleCompletion(client2())); | 406 ASSERT_TRUE(client1()->AwaitMutualSyncCycleCompletion(client2())); |
407 BookmarkModelVerifier::ExpectModelsMatch(model_one, model_two); | 407 BookmarkModelVerifier::ExpectModelsMatch(model_one, model_two); |
408 Cleanup(); | 408 Cleanup(); |
409 } | 409 } |
410 | 410 |
411 // Test Scribe ID - 370439. | 411 // Test Scribe ID - 370439. |
412 IN_PROC_BROWSER_TEST_F(LiveSyncTestDefaultIEFavorites, | 412 IN_PROC_BROWSER_TEST_F(LiveSyncTestDefaultIEFavorites, |
413 SC_BootStrapWithDefaultIEFavorites) { | 413 DISABLED_SC_BootStrapWithDefaultIEFavorites) { |
414 ASSERT_TRUE(SetupSync()) << "Failed to SetupSync"; | 414 ASSERT_TRUE(SetupSync()) << "Failed to SetupSync"; |
415 scoped_ptr<BookmarkModelVerifier> verifier(BookmarkModelVerifier::Create()); | 415 scoped_ptr<BookmarkModelVerifier> verifier(BookmarkModelVerifier::Create()); |
416 BookmarkModel* model_one = profile1()->GetBookmarkModel(); | 416 BookmarkModel* model_one = profile1()->GetBookmarkModel(); |
417 BookmarkModel* model_two = profile2()->GetBookmarkModel(); | 417 BookmarkModel* model_two = profile2()->GetBookmarkModel(); |
418 | 418 |
419 // Wait for changes to propagate. | 419 // Wait for changes to propagate. |
420 ASSERT_TRUE(client1()->AwaitMutualSyncCycleCompletion(client2())); | 420 ASSERT_TRUE(client1()->AwaitMutualSyncCycleCompletion(client2())); |
421 // Let's compare and make sure both bookmark models are same after sync. | 421 // Let's compare and make sure both bookmark models are same after sync. |
422 verifier->ExpectMatch(model_one); | 422 verifier->ExpectMatch(model_one); |
423 verifier->ExpectMatch(model_two); | 423 verifier->ExpectMatch(model_two); |
424 | 424 |
425 Cleanup(); | 425 Cleanup(); |
426 } | 426 } |
427 | 427 |
428 // Test Scribe ID - 370441. | 428 // Test Scribe ID - 370441. |
429 IN_PROC_BROWSER_TEST_F(LiveSyncTestComplexHierarchy800BM, | 429 IN_PROC_BROWSER_TEST_F(LiveSyncTestComplexHierarchy800BM, |
430 SC_BootStrapWithComplexBMHierarchy) { | 430 DISABLED_SC_BootStrapWithComplexBMHierarchy) { |
431 ASSERT_TRUE(SetupSync()) << "Failed to SetupSync"; | 431 ASSERT_TRUE(SetupSync()) << "Failed to SetupSync"; |
432 scoped_ptr<BookmarkModelVerifier> verifier(BookmarkModelVerifier::Create()); | 432 scoped_ptr<BookmarkModelVerifier> verifier(BookmarkModelVerifier::Create()); |
433 BookmarkModel* model_one = profile1()->GetBookmarkModel(); | 433 BookmarkModel* model_one = profile1()->GetBookmarkModel(); |
434 BookmarkModel* model_two = profile2()->GetBookmarkModel(); | 434 BookmarkModel* model_two = profile2()->GetBookmarkModel(); |
435 | 435 |
436 // Wait for changes to propagate. | 436 // Wait for changes to propagate. |
437 ASSERT_TRUE(client1()->AwaitMutualSyncCycleCompletion(client2())); | 437 ASSERT_TRUE(client1()->AwaitMutualSyncCycleCompletion(client2())); |
438 // Let's compare and make sure both bookmark models are same after sync. | 438 // Let's compare and make sure both bookmark models are same after sync. |
439 verifier->ExpectMatch(model_one); | 439 verifier->ExpectMatch(model_one); |
440 verifier->ExpectMatch(model_two); | 440 verifier->ExpectMatch(model_two); |
441 | 441 |
442 Cleanup(); | 442 Cleanup(); |
443 } | 443 } |
444 | 444 |
445 // Test Scribe ID - 370442. | 445 // Test Scribe ID - 370442. |
446 IN_PROC_BROWSER_TEST_F(LiveSyncTestHugeHierarchy5500BM, | 446 IN_PROC_BROWSER_TEST_F(LiveSyncTestHugeHierarchy5500BM, |
447 SC_BootStrapWithHugeBMs) { | 447 DISABLED_SC_BootStrapWithHugeBMs) { |
448 ASSERT_TRUE(SetupSync()) << "Failed to SetupSync"; | 448 ASSERT_TRUE(SetupSync()) << "Failed to SetupSync"; |
449 scoped_ptr<BookmarkModelVerifier> verifier(BookmarkModelVerifier::Create()); | 449 scoped_ptr<BookmarkModelVerifier> verifier(BookmarkModelVerifier::Create()); |
450 BookmarkModel* model_one = profile1()->GetBookmarkModel(); | 450 BookmarkModel* model_one = profile1()->GetBookmarkModel(); |
451 BookmarkModel* model_two = profile2()->GetBookmarkModel(); | 451 BookmarkModel* model_two = profile2()->GetBookmarkModel(); |
452 | 452 |
453 // Wait for changes to propagate. | 453 // Wait for changes to propagate. |
454 ASSERT_TRUE(client1()->AwaitMutualSyncCycleCompletion(client2())); | 454 ASSERT_TRUE(client1()->AwaitMutualSyncCycleCompletion(client2())); |
455 // Let's compare and make sure both bookmark models are same after sync. | 455 // Let's compare and make sure both bookmark models are same after sync. |
456 verifier->ExpectMatch(model_one); | 456 verifier->ExpectMatch(model_one); |
457 verifier->ExpectMatch(model_two); | 457 verifier->ExpectMatch(model_two); |
458 | 458 |
459 Cleanup(); | 459 Cleanup(); |
460 } | 460 } |
461 | 461 |
462 // Test Scribe ID - 370489. | 462 // Test Scribe ID - 370489. |
463 IN_PROC_BROWSER_TEST_F(LiveSyncTestPrePopulatedHistory1K, | 463 IN_PROC_BROWSER_TEST_F(LiveSyncTestPrePopulatedHistory1K, |
464 SC_AddFirstBMWithFavicon) { | 464 DISABLED_SC_AddFirstBMWithFavicon) { |
465 | 465 |
466 ASSERT_TRUE(SetupSync()) << "Failed to SetupSync"; | 466 ASSERT_TRUE(SetupSync()) << "Failed to SetupSync"; |
467 scoped_ptr<BookmarkModelVerifier> verifier(BookmarkModelVerifier::Create()); | 467 scoped_ptr<BookmarkModelVerifier> verifier(BookmarkModelVerifier::Create()); |
468 BookmarkModel* model_one = profile1()->GetBookmarkModel(); | 468 BookmarkModel* model_one = profile1()->GetBookmarkModel(); |
469 BookmarkModel* model_two = profile2()->GetBookmarkModel(); | 469 BookmarkModel* model_two = profile2()->GetBookmarkModel(); |
470 const BookmarkNode* bbn_one = model_one->GetBookmarkBarNode(); | 470 const BookmarkNode* bbn_one = model_one->GetBookmarkBarNode(); |
471 | 471 |
472 verifier->ExpectMatch(model_one); | 472 verifier->ExpectMatch(model_one); |
473 verifier->ExpectMatch(model_two); | 473 verifier->ExpectMatch(model_two); |
474 | 474 |
(...skipping 1785 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2260 | 2260 |
2261 ASSERT_TRUE(client1()->AwaitMutualSyncCycleCompletion(client2())); | 2261 ASSERT_TRUE(client1()->AwaitMutualSyncCycleCompletion(client2())); |
2262 verifier->ExpectMatch(model_one); | 2262 verifier->ExpectMatch(model_one); |
2263 verifier->ExpectMatch(model_two); | 2263 verifier->ExpectMatch(model_two); |
2264 | 2264 |
2265 Cleanup(); | 2265 Cleanup(); |
2266 } | 2266 } |
2267 | 2267 |
2268 // Test Scribe ID - 373378. | 2268 // Test Scribe ID - 373378. |
2269 IN_PROC_BROWSER_TEST_F(LiveSyncTestBasicHierarchy50BM, | 2269 IN_PROC_BROWSER_TEST_F(LiveSyncTestBasicHierarchy50BM, |
2270 MC_PushExistingBMsToSecondClient) { | 2270 DISABLED_MC_PushExistingBMsToSecondClient) { |
2271 ASSERT_TRUE(SetupSync()) << "Failed to SetupSync"; | 2271 ASSERT_TRUE(SetupSync()) << "Failed to SetupSync"; |
2272 scoped_ptr<BookmarkModelVerifier> verifier(BookmarkModelVerifier::Create()); | 2272 scoped_ptr<BookmarkModelVerifier> verifier(BookmarkModelVerifier::Create()); |
2273 BookmarkModel* model_one = profile1()->GetBookmarkModel(); | 2273 BookmarkModel* model_one = profile1()->GetBookmarkModel(); |
2274 BookmarkModel* model_two = profile2()->GetBookmarkModel(); | 2274 BookmarkModel* model_two = profile2()->GetBookmarkModel(); |
2275 | 2275 |
2276 // Wait for changes to propagate. | 2276 // Wait for changes to propagate. |
2277 ASSERT_TRUE(client1()->AwaitMutualSyncCycleCompletion(client2())); | 2277 ASSERT_TRUE(client1()->AwaitMutualSyncCycleCompletion(client2())); |
2278 // Let's compare and make sure both bookmark models are same after sync. | 2278 // Let's compare and make sure both bookmark models are same after sync. |
2279 verifier->ExpectMatch(model_one); | 2279 verifier->ExpectMatch(model_one); |
2280 verifier->ExpectMatch(model_two); | 2280 verifier->ExpectMatch(model_two); |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2330 ASSERT_TRUE(client1()->AwaitMutualSyncCycleCompletion(client2())); | 2330 ASSERT_TRUE(client1()->AwaitMutualSyncCycleCompletion(client2())); |
2331 // Let's compare and make sure both bookmark models are same after sync. | 2331 // Let's compare and make sure both bookmark models are same after sync. |
2332 verifier->ExpectMatch(model_one); | 2332 verifier->ExpectMatch(model_one); |
2333 verifier->ExpectMatch(model_two); | 2333 verifier->ExpectMatch(model_two); |
2334 | 2334 |
2335 Cleanup(); | 2335 Cleanup(); |
2336 } | 2336 } |
2337 | 2337 |
2338 // Test Scribe ID - 373507. | 2338 // Test Scribe ID - 373507. |
2339 IN_PROC_BROWSER_TEST_F(LiveSyncTestBasicHierarchy50BMBothClients, | 2339 IN_PROC_BROWSER_TEST_F(LiveSyncTestBasicHierarchy50BMBothClients, |
2340 MC_FirstUseExistingSameBMModelBothClients) { | 2340 DISABLED_MC_FirstUseExistingSameBMModelBothClients) { |
2341 ASSERT_TRUE(SetupSync()) << "Failed to SetupSync"; | 2341 ASSERT_TRUE(SetupSync()) << "Failed to SetupSync"; |
2342 scoped_ptr<BookmarkModelVerifier> verifier(BookmarkModelVerifier::Create()); | 2342 scoped_ptr<BookmarkModelVerifier> verifier(BookmarkModelVerifier::Create()); |
2343 BookmarkModel* model_one = profile1()->GetBookmarkModel(); | 2343 BookmarkModel* model_one = profile1()->GetBookmarkModel(); |
2344 BookmarkModel* model_two = profile2()->GetBookmarkModel(); | 2344 BookmarkModel* model_two = profile2()->GetBookmarkModel(); |
2345 | 2345 |
2346 // Wait for changes to propagate. | 2346 // Wait for changes to propagate. |
2347 ASSERT_TRUE(client1()->AwaitMutualSyncCycleCompletion(client2())); | 2347 ASSERT_TRUE(client1()->AwaitMutualSyncCycleCompletion(client2())); |
2348 // Let's compare and make sure both bookmark models are same after sync. | 2348 // Let's compare and make sure both bookmark models are same after sync. |
2349 verifier->ExpectMatch(model_one); | 2349 verifier->ExpectMatch(model_one); |
2350 verifier->ExpectMatch(model_two); | 2350 verifier->ExpectMatch(model_two); |
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2515 // Wait for changes to propagate. | 2515 // Wait for changes to propagate. |
2516 ASSERT_TRUE(client2()->AwaitMutualSyncCycleCompletion(client1())); | 2516 ASSERT_TRUE(client2()->AwaitMutualSyncCycleCompletion(client1())); |
2517 // Let's make sure there aren't any duplicates after sync. | 2517 // Let's make sure there aren't any duplicates after sync. |
2518 BookmarkModelVerifier::VerifyNoDuplicates(model_one); | 2518 BookmarkModelVerifier::VerifyNoDuplicates(model_one); |
2519 // Let's compare and make sure both bookmark models are same after sync. | 2519 // Let's compare and make sure both bookmark models are same after sync. |
2520 BookmarkModelVerifier::ExpectModelsMatchIncludingFavicon( | 2520 BookmarkModelVerifier::ExpectModelsMatchIncludingFavicon( |
2521 model_one, model_two, false); | 2521 model_one, model_two, false); |
2522 | 2522 |
2523 Cleanup(); | 2523 Cleanup(); |
2524 } | 2524 } |
OLD | NEW |