Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(52)

Side by Side Diff: chrome/test/live_sync/two_client_live_bookmarks_sync_test.cc

Issue 6588119: First-time sync: asymptotic running time improvement (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/chrome/Release
Patch Set: Fix test bug. Created 9 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/browser/sync/syncable/syncable_id_unittest.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 #include "base/rand_util.h" 5 #include "base/rand_util.h"
6 #include "base/stringprintf.h" 6 #include "base/stringprintf.h"
7 #include "chrome/browser/profiles/profile.h" 7 #include "chrome/browser/profiles/profile.h"
8 #include "chrome/browser/sync/profile_sync_service_harness.h" 8 #include "chrome/browser/sync/profile_sync_service_harness.h"
9 #include "chrome/test/live_sync/live_bookmarks_sync_test.h" 9 #include "chrome/test/live_sync/live_bookmarks_sync_test.h"
10 10
(...skipping 1064 matching lines...) Expand 10 before | Expand all | Expand 10 after
1075 IN_PROC_BROWSER_TEST_F(TwoClientLiveBookmarksSyncTest, 1075 IN_PROC_BROWSER_TEST_F(TwoClientLiveBookmarksSyncTest,
1076 SC_ReverseTheOrderOfTenBMFolders) { 1076 SC_ReverseTheOrderOfTenBMFolders) {
1077 ASSERT_TRUE(SetupSync()) << "SetupSync() failed."; 1077 ASSERT_TRUE(SetupSync()) << "SetupSync() failed.";
1078 ASSERT_TRUE(AllModelsMatchVerifier()); 1078 ASSERT_TRUE(AllModelsMatchVerifier());
1079 1079
1080 for (int i = 0; i < 10; ++i) { 1080 for (int i = 0; i < 10; ++i) {
1081 std::wstring title = IndexedFolderName(i); 1081 std::wstring title = IndexedFolderName(i);
1082 const BookmarkNode* folder = AddGroup(0, i, title); 1082 const BookmarkNode* folder = AddGroup(0, i, title);
1083 ASSERT_TRUE(folder != NULL); 1083 ASSERT_TRUE(folder != NULL);
1084 for (int j = 0; j < 10; ++j) { 1084 for (int j = 0; j < 10; ++j) {
1085 std::wstring title = IndexedURLTitle(j); 1085 std::wstring title = IndexedURLTitle(1000 * i + j);
1086 GURL url = GURL(IndexedURL(j)); 1086 GURL url = GURL(IndexedURL(j));
1087 ASSERT_TRUE(AddURL(0, folder, j, title, url) != NULL); 1087 ASSERT_TRUE(AddURL(0, folder, j, title, url) != NULL);
1088 } 1088 }
1089 } 1089 }
1090 ASSERT_TRUE(GetClient(0)->AwaitMutualSyncCycleCompletion(GetClient(1))); 1090 ASSERT_TRUE(GetClient(0)->AwaitMutualSyncCycleCompletion(GetClient(1)));
1091 ASSERT_TRUE(AllModelsMatchVerifier()); 1091 ASSERT_TRUE(AllModelsMatchVerifier());
1092 1092
1093 ReverseChildOrder(0, GetBookmarkBarNode(0)); 1093 ReverseChildOrder(0, GetBookmarkBarNode(0));
1094 ASSERT_TRUE(GetClient(0)->AwaitMutualSyncCycleCompletion(GetClient(1))); 1094 ASSERT_TRUE(GetClient(0)->AwaitMutualSyncCycleCompletion(GetClient(1)));
1095 ASSERT_TRUE(AllModelsMatchVerifier()); 1095 ASSERT_TRUE(AllModelsMatchVerifier());
(...skipping 371 matching lines...) Expand 10 before | Expand all | Expand 10 after
1467 } 1467 }
1468 1468
1469 ASSERT_TRUE(SetupSync()) << "SetupSync() failed."; 1469 ASSERT_TRUE(SetupSync()) << "SetupSync() failed.";
1470 ASSERT_TRUE(AwaitQuiescence()); 1470 ASSERT_TRUE(AwaitQuiescence());
1471 ASSERT_TRUE(AllModelsMatch()); 1471 ASSERT_TRUE(AllModelsMatch());
1472 1472
1473 for (int i = 1; i < 5 ; ++i) { 1473 for (int i = 1; i < 5 ; ++i) {
1474 ASSERT_TRUE(CountBookmarksWithTitlesMatching(1, IndexedURLTitle(i)) == i); 1474 ASSERT_TRUE(CountBookmarksWithTitlesMatching(1, IndexedURLTitle(i)) == i);
1475 } 1475 }
1476 } 1476 }
OLDNEW
« no previous file with comments | « chrome/browser/sync/syncable/syncable_id_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698