diff options
author | rsimha@chromium.org <rsimha@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-07-16 21:47:56 +0000 |
---|---|---|
committer | rsimha@chromium.org <rsimha@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-07-16 21:47:56 +0000 |
commit | 483098c8a3a47748b14c634caaf3a6844c6931c1 (patch) | |
tree | 30f15421e25b65a051529bbae1c8c8c51b192732 /net/tools | |
parent | 74464846f36668ff02e4f25dfd44eb5bc21eb5b4 (diff) | |
download | chromium_src-483098c8a3a47748b14c634caaf3a6844c6931c1.zip chromium_src-483098c8a3a47748b14c634caaf3a6844c6931c1.tar.gz chromium_src-483098c8a3a47748b14c634caaf3a6844c6931c1.tar.bz2 |
Sync server should return correct version number on item deletion.
When a sync item is deleted, the python sync server returns a version
number of 0 on commit, when in fact, an incremented version number must
be returned. This was causing some errors in integration tests.
BUG=49365
TEST=sync_integration_tests
Review URL: http://codereview.chromium.org/2868055
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@52753 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/tools')
-rwxr-xr-x | net/tools/testserver/chromiumsync.py | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/net/tools/testserver/chromiumsync.py b/net/tools/testserver/chromiumsync.py index 7801cdf..a15d265 100755 --- a/net/tools/testserver/chromiumsync.py +++ b/net/tools/testserver/chromiumsync.py @@ -36,7 +36,7 @@ ALL_TYPES = ( PASSWORD, PREFERENCE, # SESSION, - THEME,
+ THEME, TYPED_URL) = range(9) # Given a sync type from ALL_TYPES, find the extension token corresponding @@ -166,7 +166,7 @@ class SyncDataModel(object): parent_tag='google_chrome', sync_type=EXTENSIONS), PermanentItem('google_chrome_passwords', name='Passwords', parent_tag='google_chrome', sync_type=PASSWORD), - # TODO(rsimha): Disabled since the protocol does not support it yet.
+ # TODO(rsimha): Disabled since the protocol does not support it yet. # PermanentItem('google_chrome_sessions', name='Sessions', # parent_tag='google_chrome', SESSION), PermanentItem('google_chrome_themes', name='Themes', @@ -516,7 +516,7 @@ class SyncDataModel(object): tombstone = sync_pb2.SyncEntity() tombstone.id_string = entry.id_string tombstone.deleted = True - tombstone.name = '' # 'name' is a required field; we're stuck with it. + tombstone.name = '' entry = tombstone else: # Comments in sync.proto detail how the representation of positional @@ -635,11 +635,14 @@ class TestServer(object): # of the operation. reply.id_string = server_entry.id_string if not server_entry.deleted: - reply.parent_id_string = server_entry.parent_id_string + # Note: the production server doesn't actually send the + # parent_id_string on commit responses, so we don't either. reply.position_in_parent = server_entry.position_in_parent reply.version = server_entry.version reply.name = server_entry.name reply.non_unique_name = server_entry.non_unique_name + else: + reply.version = entry.version + 1 def HandleGetUpdates(self, update_request, update_response): """Respond to a GetUpdates request by querying the user's account. |