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

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

Issue 3078031: Simple offline startup integration test. (Closed)
Patch Set: Disable test. Created 10 years, 4 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/test/live_sync/profile_sync_service_test_harness.cc ('k') | net/tools/testserver/testserver.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/tools/testserver/chromiumsync.py
diff --git a/net/tools/testserver/chromiumsync.py b/net/tools/testserver/chromiumsync.py
index 8e3ea46dcb5a48c80f4dec30fbbe8e57fdeaad3e..33ab8bea731cef695e03a15046375a971812c7ac 100755
--- a/net/tools/testserver/chromiumsync.py
+++ b/net/tools/testserver/chromiumsync.py
@@ -592,6 +592,19 @@ class TestServer(object):
# The implementation supports exactly one account; its state is here.
self.account = SyncDataModel()
self.account_lock = threading.Lock()
+ self.account_user_email = 'syncjuser@chromium.org'
+
+ def HandleConfigure(self, config):
+ """Handles various test configuration parameters sent from the client.
+
+ Args:
+ config: Dictionary of configuration parameters.
+ Returns:
+ True if configuration was successful.
+ """
+ if config.has_key('user_email'):
+ self.account_user_email = config['user_email'][0]
+ return True
def HandleCommand(self, raw_request):
"""Decode and handle a sync command from a raw input of bytes.
@@ -621,7 +634,7 @@ class TestServer(object):
print 'Authenticate'
# We accept any authentication token, and support only one account.
# TODO(nick): Mock out the GAIA authentication as well; hook up here.
- response.authenticate.user.email = 'syncjuser@chromium'
+ response.authenticate.user.email = self.account_user_email
response.authenticate.user.display_name = 'Sync J User'
elif contents == sync_pb2.ClientToServerMessage.COMMIT:
print 'Commit'
« no previous file with comments | « chrome/test/live_sync/profile_sync_service_test_harness.cc ('k') | net/tools/testserver/testserver.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698