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

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

Issue 20672002: [telemetry] Add a webdriver backend with support for IE. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address comments. Created 7 years, 5 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/util.py
diff --git a/tools/telemetry/telemetry/core/util.py b/tools/telemetry/telemetry/core/util.py
index 2fe792feccc02b74fc9e685053f7cf7d0d366dfa..92423dcacbe698b77e5f72dd836f50fca840ca42 100644
--- a/tools/telemetry/telemetry/core/util.py
+++ b/tools/telemetry/telemetry/core/util.py
@@ -70,6 +70,18 @@ class PortPair(object):
self.local_port = local_port
self.remote_port = remote_port
+class DoNothingForwarder(object):
+ def __init__(self, *port_pairs):
+ self._host_port = port_pairs[0].local_port
+
+ @property
+ def url(self):
+ assert self._host_port
+ return 'http://127.0.0.1:%i' % self._host_port
+
+ def Close(self):
+ self._host_port = None
+
def GetAvailableLocalPort():
tmp = socket.socket()
tmp.bind(('', 0))

Powered by Google App Engine
This is Rietveld 408576698