summaryrefslogtreecommitdiffstats
path: root/net/tools/testserver
diff options
context:
space:
mode:
Diffstat (limited to 'net/tools/testserver')
-rwxr-xr-xnet/tools/testserver/chromiumsync.py15
-rw-r--r--net/tools/testserver/testserver.py24
2 files changed, 1 insertions, 38 deletions
diff --git a/net/tools/testserver/chromiumsync.py b/net/tools/testserver/chromiumsync.py
index a9041f0..c36054c 100755
--- a/net/tools/testserver/chromiumsync.py
+++ b/net/tools/testserver/chromiumsync.py
@@ -619,19 +619,6 @@ 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.
@@ -661,7 +648,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 = self.account_user_email
+ response.authenticate.user.email = 'syncjuser@chromium'
response.authenticate.user.display_name = 'Sync J User'
elif contents == sync_pb2.ClientToServerMessage.COMMIT:
print 'Commit'
diff --git a/net/tools/testserver/testserver.py b/net/tools/testserver/testserver.py
index 4f30b2c..6ab36df 100644
--- a/net/tools/testserver/testserver.py
+++ b/net/tools/testserver/testserver.py
@@ -141,7 +141,6 @@ class TestPageHandler(BaseHTTPServer.BaseHTTPRequestHandler):
self.WriteFile,
self.EchoTitleHandler,
self.EchoAllHandler,
- self.ChromiumSyncConfigureHandler,
self.ChromiumSyncCommandHandler,
self.EchoHandler] + self._get_handlers
self._put_handlers = [
@@ -1027,29 +1026,6 @@ class TestPageHandler(BaseHTTPServer.BaseHTTPRequestHandler):
self.end_headers()
return True
- def ChromiumSyncConfigureHandler(self):
- """Handle updating the configuration of the sync server.
-
- The name and value pairs of the post payload will update the
- configuration of the sync server. Supported tuples are:
- user_email,<email address> - Sets the email for the fake user account
- """
- test_name = "/chromiumsync/configure"
- if not self._ShouldHandleRequest(test_name):
- return False
-
- length = int(self.headers.getheader('content-length'))
- raw_request = self.rfile.read(length)
- config = cgi.parse_qs(raw_request, keep_blank_values=1)
-
- success = self._sync_handler.HandleConfigure(config)
- if success:
- self.send_response(200)
- else:
- self.send_response(500)
- self.end_headers()
- return True
-
def ChromiumSyncCommandHandler(self):
"""Handle a chromiumsync command arriving via http.