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

Unified Diff: chrome/test/functional/devtools_test_base.py

Issue 11740020: [telemetry] Removing globals from webpagereplay.py. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 12 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 | « no previous file | chrome/test/functional/perf.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/functional/devtools_test_base.py
diff --git a/chrome/test/functional/devtools_test_base.py b/chrome/test/functional/devtools_test_base.py
index bf938d808148509f6fdb17d9df461ff932bb9d60..b89fda195223e2ec57c8b630660d111866ed9ce7 100755
--- a/chrome/test/functional/devtools_test_base.py
+++ b/chrome/test/functional/devtools_test_base.py
@@ -33,6 +33,10 @@ class DevToolsTestBase(pyauto.PyUITest):
os.path.join(os.path.dirname(__file__), os.pardir, os.pardir, os.pardir,
'data', 'devtools_test_pages'))
+ WEBPAGEREPLAY_HOST = '127.0.0.1'
+ WEBPAGEREPLAY_HTTP_PORT = 8080
+ WEBPAGEREPLAY_HTTPS_PORT = 8413
+
def ExtraChromeFlags(self):
"""Ensures Chrome is launched with custom flags.
@@ -41,7 +45,10 @@ class DevToolsTestBase(pyauto.PyUITest):
"""
# Ensure Chrome enables remote debugging on port 9222. This is required to
# interact with Chrome's remote inspector.
- extra_flags = ['--remote-debugging-port=9222'] + webpagereplay.CHROME_FLAGS
+ extra_flags = ['--remote-debugging-port=9222'] + \
+ webpagereplay.GetChromeFlags(self.WEBPAGEREPLAY_HOST,
+ self.WEBPAGEREPLAY_HTTP_PORT,
+ self.WEBPAGEREPLAY_HTTPS_PORT)
return (pyauto.PyUITest.ExtraChromeFlags(self) + extra_flags)
def setUp(self):
@@ -63,7 +70,11 @@ class DevToolsTestBase(pyauto.PyUITest):
replay_options = None
hostname = urlparse(url).hostname
archive_path = os.path.join(self.DATA_PATH, hostname + '.wpr')
- with webpagereplay.ReplayServer(archive_path, replay_options):
+ with webpagereplay.ReplayServer(archive_path,
+ self.WEBPAGEREPLAY_HOST,
+ self.WEBPAGEREPLAY_HTTP_PORT,
+ self.WEBPAGEREPLAY_HTTPS_PORT,
+ replay_options):
self.NavigateToURL(url)
snapshot = self._remote_inspector_client.GetProcessMemoryDistribution()
logging.info('Got snapshot for url: %s' % url)
« no previous file with comments | « no previous file | chrome/test/functional/perf.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698