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

Unified Diff: tools/telemetry/telemetry/core/browser.py

Issue 24451002: [telemetry] Support absolute paths by changing file:/// to file://. More robust file path handling. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix unit test on mac, apparently /tmp is a symlink to /private/tmp Created 7 years, 2 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
Index: tools/telemetry/telemetry/core/browser.py
diff --git a/tools/telemetry/telemetry/core/browser.py b/tools/telemetry/telemetry/core/browser.py
index 93388974eaf242a75b8a3a9e0aa1542cd5a93cb5..38f9aead7ff5467bc4cc2cbc50ee2018e7b17bfb 100644
--- a/tools/telemetry/telemetry/core/browser.py
+++ b/tools/telemetry/telemetry/core/browser.py
@@ -294,14 +294,14 @@ class Browser(object):
def SetHTTPServerDirectories(self, paths):
"""Returns True if the HTTP server was started, False otherwise."""
- if not isinstance(paths, list):
- paths = [paths]
- paths = [os.path.abspath(p) for p in paths]
-
- if paths and self._http_server and self._http_server.paths == paths:
- return False
+ if isinstance(paths, basestring):
+ paths = set([paths])
+ paths = set(os.path.realpath(p) for p in paths)
if self._http_server:
+ if paths and self._http_server.paths == paths:
+ return False
+
self._http_server.Close()
self._http_server = None
« no previous file with comments | « tools/perf/page_sets/tough_video_cases.json ('k') | tools/telemetry/telemetry/core/memory_cache_http_server.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698