Chromium Code Reviews| Index: chrome/test/functional/webpagereplay.py |
| diff --git a/chrome/test/functional/webpagereplay.py b/chrome/test/functional/webpagereplay.py |
| index c6d3350c7b3d828f935de6f9f0d4e9d91b45fbba..22b06e84a323104c6071774ab992c648295c7de1 100755 |
| --- a/chrome/test/functional/webpagereplay.py |
| +++ b/chrome/test/functional/webpagereplay.py |
| @@ -13,14 +13,22 @@ Of the public module names, the following ones are key: |
| import logging |
| import os |
| import signal |
| +import socket |
| import subprocess |
| import sys |
| import time |
| import urllib |
| +def GetRandomOpenPort(): |
|
bulach
2012/11/26 13:53:46
drive-by: can we re-use / improve this?
http://src
|
| + tmp = socket.socket() |
| + tmp.bind(('', 0)) |
| + port = tmp.getsockname()[1] |
| + tmp.close() |
| -HTTP_PORT = 8080 |
| -HTTPS_PORT = 8413 |
| + return port |
| + |
| +HTTP_PORT = GetRandomOpenPort() |
| +HTTPS_PORT = GetRandomOpenPort() |
| REPLAY_HOST='127.0.0.1' |
| CHROME_FLAGS = [ |
| '--host-resolver-rules=MAP * %s,EXCLUDE localhost' % REPLAY_HOST, |