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

Unified Diff: tools/chrome_proxy/integration_tests/chrome_proxy_metrics.py

Issue 397483002: Move chrome_proxy tests from under tools/perf to tools/chrome_proxy/integration_tests. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: addressed comments and sync'ed Created 6 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/chrome_proxy/integration_tests/chrome_proxy_metrics.py
diff --git a/tools/perf/metrics/chrome_proxy.py b/tools/chrome_proxy/integration_tests/chrome_proxy_metrics.py
similarity index 97%
rename from tools/perf/metrics/chrome_proxy.py
rename to tools/chrome_proxy/integration_tests/chrome_proxy_metrics.py
index 390da68141dc380f6d8ba897932885871d5719b1..0a7c07093a6c95dd474cfb52dad7e02e5ced6351 100644
--- a/tools/perf/metrics/chrome_proxy.py
+++ b/tools/chrome_proxy/integration_tests/chrome_proxy_metrics.py
@@ -6,8 +6,8 @@ import datetime
import logging
import os
+from integration_tests import network_metrics
from telemetry.page import page_measurement
-from metrics import network
from telemetry.value import scalar
@@ -30,7 +30,8 @@ DEFAULT_BYPASS_MAX_SECONDS = 5 * 60
def GetProxyInfoFromNetworkInternals(tab, url='chrome://net-internals#proxy'):
tab.Navigate(url)
- with open(os.path.join(os.path.dirname(__file__), 'chrome_proxy.js')) as f:
+ with open(os.path.join(os.path.dirname(__file__),
+ 'chrome_proxy_metrics.js')) as f:
js = f.read()
tab.ExecuteJavaScript(js)
tab.WaitForJavaScriptExpression('performance.timing.loadEventStart', 300)
@@ -43,7 +44,7 @@ def ProxyRetryTimeInRange(retry_time, low, high, grace_seconds=30):
(retry_time < high + datetime.timedelta(seconds=grace_seconds)))
-class ChromeProxyResponse(network.HTTPResponse):
+class ChromeProxyResponse(network_metrics.HTTPResponse):
""" Represents an HTTP response from a timeleine event."""
def __init__(self, event):
super(ChromeProxyResponse, self).__init__(event)
@@ -88,7 +89,7 @@ class ChromeProxyResponse(network.HTTPResponse):
return False
-class ChromeProxyMetric(network.NetworkMetric):
+class ChromeProxyMetric(network_metrics.NetworkMetric):
"""A Chrome proxy timeline metric."""
def __init__(self):

Powered by Google App Engine
This is Rietveld 408576698