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

Unified Diff: chrome/browser/sync/test/integration/two_client_bookmarks_sync_test.cc

Issue 9570055: [Sync] Add support for associating a new Synced Bookmarks node. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase, address comments Created 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/sync/test/integration/sync_test.cc ('k') | net/tools/testserver/chromiumsync.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/sync/test/integration/two_client_bookmarks_sync_test.cc
diff --git a/chrome/browser/sync/test/integration/two_client_bookmarks_sync_test.cc b/chrome/browser/sync/test/integration/two_client_bookmarks_sync_test.cc
index a3bd6759c6774bde5e3a031cac2728cb6c71dce4..933fcaab7bd34a864c4760b8fdc9a1a1749a200e 100644
--- a/chrome/browser/sync/test/integration/two_client_bookmarks_sync_test.cc
+++ b/chrome/browser/sync/test/integration/two_client_bookmarks_sync_test.cc
@@ -18,6 +18,7 @@ using bookmarks_helper::CountBookmarksWithTitlesMatching;
using bookmarks_helper::CreateFavicon;
using bookmarks_helper::GetBookmarkBarNode;
using bookmarks_helper::GetOtherNode;
+using bookmarks_helper::GetSyncedBookmarksNode;
using bookmarks_helper::GetUniqueNodeByURL;
using bookmarks_helper::HasNodeWithURL;
using bookmarks_helper::IndexedFolderName;
@@ -1921,3 +1922,28 @@ IN_PROC_BROWSER_TEST_F(TwoClientBookmarksSyncTest, RestartSyncService) {
GetClient(0)->GetStatus().summary);
ASSERT_EQ(0, GetClient(0)->GetStatus().unsynced_count);
}
+
+// Trigger the server side creation of Synced Bookmarks. Ensure both clients
+// remain syncing afterwards. Add bookmarks to the synced bookmarks folder
+// and ensure both clients receive the boomkmark.
+IN_PROC_BROWSER_TEST_F(TwoClientBookmarksSyncTest, CreateSyncedBookmarks) {
+ ASSERT_TRUE(SetupSync()) << "SetupSync() failed.";
+ ASSERT_TRUE(AllModelsMatchVerifier());
+
+ TriggerCreateSyncedBookmarks();
+
+ // Add a bookmark on Client 0 and ensure it syncs over. This will also trigger
+ // both clients downloading the new Synced Bookmarks folder.
+ ASSERT_TRUE(AddURL(0, L"Google", GURL("http://www.google.com")));
+ ASSERT_TRUE(AwaitQuiescence());
+ ASSERT_TRUE(AllModelsMatch());
+
+ // Now add a bookmark within the Synced Bookmarks folder and ensure it syncs
+ // over.
+ const BookmarkNode* synced_bookmarks = GetSyncedBookmarksNode(0);
+ ASSERT_TRUE(synced_bookmarks);
+ ASSERT_TRUE(AddURL(0, synced_bookmarks, 0, L"Google2",
+ GURL("http://www.google2.com")));
+ ASSERT_TRUE(GetClient(0)->AwaitMutualSyncCycleCompletion(GetClient(1)));
+ ASSERT_TRUE(AllModelsMatch());
+}
« no previous file with comments | « chrome/browser/sync/test/integration/sync_test.cc ('k') | net/tools/testserver/chromiumsync.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698