Index: sync/tools/testserver/sync_testserver.py |
diff --git a/sync/tools/testserver/sync_testserver.py b/sync/tools/testserver/sync_testserver.py |
index 66789ead097e9ac41d6b7d48d8c83a2c4c0554dd..b3ca64203043cac0040294efc69ebd98b3f917d3 100755 |
--- a/sync/tools/testserver/sync_testserver.py |
+++ b/sync/tools/testserver/sync_testserver.py |
@@ -154,10 +154,6 @@ class SyncPageHandler(testserver_base.BasePageHandler): |
self.ChromiumSyncEnablePreCommitGetUpdateAvoidanceHandler, |
self.GaiaOAuth2TokenHandler, |
self.GaiaSetOAuth2TokenResponseHandler, |
- self.TriggerSyncedNotificationHandler, |
- self.SyncedNotificationsPageHandler, |
- self.TriggerSyncedNotificationAppInfoHandler, |
- self.SyncedNotificationsAppInfoPageHandler, |
self.CustomizeClientCommandHandler] |
post_handlers = [self.ChromiumSyncCommandHandler, |
@@ -503,68 +499,6 @@ class SyncPageHandler(testserver_base.BasePageHandler): |
self.wfile.write(raw_reply) |
return True |
- def TriggerSyncedNotificationHandler(self): |
- test_name = "/triggersyncednotification" |
- if not self._ShouldHandleRequest(test_name): |
- return False |
- |
- query = urlparse.urlparse(self.path)[4] |
- query_params = urlparse.parse_qs(query) |
- |
- serialized_notification = '' |
- |
- if 'serialized_notification' in query_params: |
- serialized_notification = query_params['serialized_notification'][0] |
- |
- try: |
- notification_string = self.server._sync_handler.account \ |
- .AddSyncedNotification(serialized_notification) |
- reply = "A synced notification was triggered:\n\n" |
- reply += "<code>{}</code>.".format(notification_string) |
- response_code = 200 |
- except chromiumsync.ClientNotConnectedError: |
- reply = ('The client is not connected to the server, so the notification' |
- ' could not be created.') |
- response_code = 400 |
- |
- self.send_response(response_code) |
- self.send_header('Content-Type', 'text/html') |
- self.send_header('Content-Length', len(reply)) |
- self.end_headers() |
- self.wfile.write(reply) |
- return True |
- |
- def TriggerSyncedNotificationAppInfoHandler(self): |
- test_name = "/triggersyncednotificationappinfo" |
- if not self._ShouldHandleRequest(test_name): |
- return False |
- |
- query = urlparse.urlparse(self.path)[4] |
- query_params = urlparse.parse_qs(query) |
- |
- app_info = '' |
- |
- if 'synced_notification_app_info' in query_params: |
- app_info = query_params['synced_notification_app_info'][0] |
- |
- try: |
- app_info_string = self.server._sync_handler.account \ |
- .AddSyncedNotificationAppInfo(app_info) |
- reply = "A synced notification app info was sent:\n\n" |
- reply += "<code>{}</code>.".format(app_info_string) |
- response_code = 200 |
- except chromiumsync.ClientNotConnectedError: |
- reply = ('The client is not connected to the server, so the app info' |
- ' could not be created.') |
- response_code = 400 |
- |
- self.send_response(response_code) |
- self.send_header('Content-Type', 'text/html') |
- self.send_header('Content-Length', len(reply)) |
- self.end_headers() |
- self.wfile.write(reply) |
- return True |
- |
def CustomizeClientCommandHandler(self): |
test_name = "/customizeclientcommand" |
if not self._ShouldHandleRequest(test_name): |
@@ -595,36 +529,6 @@ class SyncPageHandler(testserver_base.BasePageHandler): |
self.wfile.write(reply) |
return True |
- def SyncedNotificationsPageHandler(self): |
- test_name = "/syncednotifications" |
- if not self._ShouldHandleRequest(test_name): |
- return False |
- |
- html = open('sync/tools/testserver/synced_notifications.html', 'r').read() |
- |
- self.send_response(200) |
- self.send_header('Content-Type', 'text/html') |
- self.send_header('Content-Length', len(html)) |
- self.end_headers() |
- self.wfile.write(html) |
- return True |
- |
- def SyncedNotificationsAppInfoPageHandler(self): |
- test_name = "/syncednotificationsappinfo" |
- if not self._ShouldHandleRequest(test_name): |
- return False |
- |
- html = \ |
- open('sync/tools/testserver/synced_notification_app_info.html', 'r').\ |
- read() |
- |
- self.send_response(200) |
- self.send_header('Content-Type', 'text/html') |
- self.send_header('Content-Length', len(html)) |
- self.end_headers() |
- self.wfile.write(html) |
- return True |
- |
class SyncServerRunner(testserver_base.TestServerRunner): |
"""TestServerRunner for the net test servers.""" |