summaryrefslogtreecommitdiffstats
path: root/net/tools
diff options
context:
space:
mode:
authortony@chromium.org <tony@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-03-05 03:18:42 +0000
committertony@chromium.org <tony@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-03-05 03:18:42 +0000
commitb4b3ca91faef2219ef7044bc68338b6e794703ac (patch)
tree36ef7d376370808d4cc1fb03c762bf8a60aff4ae /net/tools
parent12765d53b96eeef30653cefb2c51f5ced9b02dd1 (diff)
downloadchromium_src-b4b3ca91faef2219ef7044bc68338b6e794703ac.zip
chromium_src-b4b3ca91faef2219ef7044bc68338b6e794703ac.tar.gz
chromium_src-b4b3ca91faef2219ef7044bc68338b6e794703ac.tar.bz2
Add a UI test to make sure that each frame of a multipart
request does not generate a separate row in the history database. BUG=34350 Review URL: http://codereview.chromium.org/668051 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@40709 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/tools')
-rw-r--r--net/tools/testserver/testserver.py23
1 files changed, 23 insertions, 0 deletions
diff --git a/net/tools/testserver/testserver.py b/net/tools/testserver/testserver.py
index a14a3ac..931d846 100644
--- a/net/tools/testserver/testserver.py
+++ b/net/tools/testserver/testserver.py
@@ -125,6 +125,7 @@ class TestPageHandler(BaseHTTPServer.BaseHTTPRequestHandler):
self.ContentTypeHandler,
self.ServerRedirectHandler,
self.ClientRedirectHandler,
+ self.MultipartHandler,
self.DefaultResponseHandler]
self._post_handlers = [
self.WriteFile,
@@ -988,6 +989,28 @@ class TestPageHandler(BaseHTTPServer.BaseHTTPRequestHandler):
return True
+ def MultipartHandler(self):
+ """Send a multipart response (10 text/html pages)."""
+ test_name = "/multipart"
+ if not self._ShouldHandleRequest(test_name):
+ return False
+
+ num_frames = 10
+ bound = '12345'
+ self.send_response(200)
+ self.send_header('Content-type',
+ 'multipart/x-mixed-replace;boundary=' + bound)
+ self.end_headers()
+
+ for i in xrange(num_frames):
+ self.wfile.write('--' + bound + '\r\n')
+ self.wfile.write('Content-type: text/html\r\n\r\n')
+ self.wfile.write('<title>page ' + str(i) + '</title>')
+ self.wfile.write('page ' + str(i))
+
+ self.wfile.write('--' + bound + '--')
+ return True
+
def DefaultResponseHandler(self):
"""This is the catch-all response handler for requests that aren't handled
by one of the special handlers above.