Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1)

Unified Diff: tools/browser_tester/browsertester/server.py

Issue 7745047: Enable browser tests with glibc. (Closed) Base URL: svn://svn.chromium.org/native_client/trunk/src/native_client/
Patch Set: '' Created 9 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tools/browser_tester/browser_tester.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/browser_tester/browsertester/server.py
===================================================================
--- tools/browser_tester/browsertester/server.py (revision 6583)
+++ tools/browser_tester/browsertester/server.py (working copy)
@@ -46,7 +46,11 @@
path = self.NormalizePath(path)
if path in self.server.file_mapping:
return self.server.file_mapping[path]
- elif not path.endswith('favicon.ico') and not self.server.allow_404:
+ for extra_dir in self.server.serving_dirs:
+ full_path = os.path.join(extra_dir, path)
+ if os.path.isfile(full_path):
+ return full_path
+ if not path.endswith('favicon.ico') and not self.server.allow_404:
self.server.listener.ServerError('Cannot find file \'%s\'' % path)
return path
@@ -171,13 +175,15 @@
class Server(BaseHTTPServer.HTTPServer):
def Configure(
- self, file_mapping, redirect_mapping, allow_404, bandwidth, listener):
+ self, file_mapping, redirect_mapping, allow_404, bandwidth, listener,
+ serving_dirs=[]):
self.file_mapping = file_mapping
self.redirect_mapping = redirect_mapping
self.allow_404 = allow_404
self.bandwidth = bandwidth
self.listener = listener
self.rpc_lock = threading.Lock()
+ self.serving_dirs = serving_dirs
def TestingBegun(self, timeout):
self.test_in_progress = True
« no previous file with comments | « tools/browser_tester/browser_tester.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698