summaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorrsimha@chromium.org <rsimha@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-09-15 00:16:23 +0000
committerrsimha@chromium.org <rsimha@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-09-15 00:16:23 +0000
commit45e4701d3e5db42491a0fa8e30c0b11157d1649c (patch)
tree70d3ccb32b56f7112bdf029d6d6222d9541919c0 /net
parent183d7e61b7b50a62a4338dbaccae86e8d125f348 (diff)
downloadchromium_src-45e4701d3e5db42491a0fa8e30c0b11157d1649c.zip
chromium_src-45e4701d3e5db42491a0fa8e30c0b11157d1649c.tar.gz
chromium_src-45e4701d3e5db42491a0fa8e30c0b11157d1649c.tar.bz2
Stabilize sync integration tests
This patch contains more updates to the ProfileSyncServiceTestHarness class, in light of recent changes to the sync startup sequence, and new tests that require support for offline scenarios. BUG=53858,54743,52007 TEST=sync_integration_tests Review URL: http://codereview.chromium.org/3399002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@59463 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net')
-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.