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

Unified Diff: net/tools/testserver/chromiumsync.py

Issue 9570055: [Sync] Add support for associating a new Synced Bookmarks node. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add python test 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
Index: net/tools/testserver/chromiumsync.py
diff --git a/net/tools/testserver/chromiumsync.py b/net/tools/testserver/chromiumsync.py
index b290e503d5062a4f6df260151a83fae2a0cbf59f..b21b1f0f8e2ae818e6f5f22c2d4d6274402ba4a2 100755
--- a/net/tools/testserver/chromiumsync.py
+++ b/net/tools/testserver/chromiumsync.py
@@ -924,6 +924,20 @@ class SyncDataModel(object):
True)
self._SaveEntry(nigori_new)
+ def TriggerCreateSyncedBookmarks(self):
+ """Create the Synced Bookmarks folder under the Bookmarks permanent item.
+
+ Clients will then received the Synced Bookmarks folder on future
ncarter (slow) 2012/03/07 22:05:03 "will then recieved"
Nicolas Zea 2012/03/15 21:22:50 Done.
+ GetUpdates, and new bookmarks can be added within the Synced Bookmarks
+ folder.
+ """
+
+ synced_bookmarks_spec = (
+ PermanentItem('synced_bookmarks', name='Synced Bookmarks',
+ parent_tag='google_chrome_bookmarks', sync_type=BOOKMARK))
+ self._PERMANENT_ITEM_SPECS.append(synced_bookmarks_spec)
ncarter (slow) 2012/03/07 22:05:03 You are appending to a constant here. Anything in
Nicolas Zea 2012/03/15 21:22:50 Done.
+ self._CreatePermanentItem(synced_bookmarks_spec)
+
def SetInducedError(self, error, error_frequency,
sync_count_before_errors):
self.induced_error = error
@@ -1073,6 +1087,13 @@ class TestServer(object):
200,
'<html><title>Sync Tabs</title><H1>Sync Tabs</H1></html>')
+ def HandleCreateSyncedBookmarks(self):
+ """Create the Synced Bookmarks folder under Bookmarks."""
+ self.account.TriggerCreateSyncedBookmarks()
ncarter (slow) 2012/03/07 22:05:03 I'm assuming the answer is "yes but it was hard to
Nicolas Zea 2012/03/15 21:22:50 Discussed offline, went ahead and kept current app
+ return (
+ 200,
+ '<html><title>Synced Bookmarks</title><H1>Synced Bookmarks</H1></html>')
+
def HandleCommand(self, query, raw_request):
"""Decode and handle a sync command from a raw input of bytes.

Powered by Google App Engine
This is Rietveld 408576698