diff options
author | ben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-04-10 02:37:22 +0000 |
---|---|---|
committer | ben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-04-10 02:37:22 +0000 |
commit | deb27ae20cd7d59fba58ad530a72b2dbf8a099ee (patch) | |
tree | 7c751a2197b767521e89849abd2cb35e874238d0 /net/tools/testserver | |
parent | ce7c39483b5e113ec862a231580684f35268c227 (diff) | |
download | chromium_src-deb27ae20cd7d59fba58ad530a72b2dbf8a099ee.zip chromium_src-deb27ae20cd7d59fba58ad530a72b2dbf8a099ee.tar.gz chromium_src-deb27ae20cd7d59fba58ad530a72b2dbf8a099ee.tar.bz2 |
Scrape search definitions from forms that have onsubmit handlers. The scraping is done after submit events are handled by the page DOM so doing this is safe.
Adds test infrastructure for determining that scraping occurs on submit:
- allow testserver to be configured to serve pages from / on the server
- provide a ui test util that navigates and waits for N subsequent redirections/navigations before returning control to the test to handle automated submission
Eric, please review the test server changes.
Scott, please look over everything else.
Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=13444
Review URL: http://codereview.chromium.org/62145
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@13491 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/tools/testserver')
-rw-r--r-- | net/tools/testserver/testserver.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/net/tools/testserver/testserver.py b/net/tools/testserver/testserver.py index 5784059..9ab77a8 100644 --- a/net/tools/testserver/testserver.py +++ b/net/tools/testserver/testserver.py @@ -565,13 +565,15 @@ class TestPageHandler(BaseHTTPServer.BaseHTTPRequestHandler): """This handler sends the contents of the requested file. Wow, it's like a real webserver!""" - prefix='/files/' + prefix = self.server.file_root_url if not self.path.startswith(prefix): return False file = self.path[len(prefix):] entries = file.split('/'); path = os.path.join(self.server.data_dir, *entries) + if os.path.isdir(path): + path = os.path.join(path, 'index.html') if not os.path.isfile(path): print "File not found " + file + " full path:" + path @@ -1047,6 +1049,7 @@ def main(options, args): print 'HTTP server started on port %d...' % port server.data_dir = MakeDataDir() + server.file_root_url = options.file_root_url MakeDumpDir(server.data_dir) # means FTP Server @@ -1102,6 +1105,8 @@ if __name__ == '__main__': help='Specify that https should be used, specify ' 'the path to the cert containing the private key ' 'the server should use') + option_parser.add_option('', '--file-root-url', default='/files/', + help='Specify a root URL for files served.') options, args = option_parser.parse_args() sys.exit(main(options, args)) |