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

Unified Diff: tools/chrome_proxy/integration_tests/network_metrics_unittest.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
« no previous file with comments | « tools/chrome_proxy/integration_tests/network_metrics.py ('k') | tools/chrome_proxy/run_benchmark » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/chrome_proxy/integration_tests/network_metrics_unittest.py
diff --git a/tools/perf/metrics/network_unittest.py b/tools/chrome_proxy/integration_tests/network_metrics_unittest.py
similarity index 92%
rename from tools/perf/metrics/network_unittest.py
rename to tools/chrome_proxy/integration_tests/network_metrics_unittest.py
index 5ae9974e5c477316f0a3857422912a2c0e2bf563..daafe6f10e4a325ac20ea5599e96176eb9849713 100644
--- a/tools/perf/metrics/network_unittest.py
+++ b/tools/chrome_proxy/integration_tests/network_metrics_unittest.py
@@ -5,8 +5,8 @@
import base64
import unittest
+from integration_tests import network_metrics
from metrics import test_page_measurement_results
-from metrics import network
from telemetry.timeline import event
@@ -18,7 +18,7 @@ HTML_BODY = """<!DOCTYPE HTML>
</body>
</html>"""
IMAGE_BODY = """fake image data"""
-GZIPPED_HTML_LEN = network.HTTPResponse.GetGizppedBodyLength(HTML_BODY)
+GZIPPED_HTML_LEN = network_metrics.HTTPResponse.GetGizppedBodyLength(HTML_BODY)
# Make up original content length for the image.
IMAGE_OCL = 3 * len(IMAGE_BODY)
@@ -49,7 +49,7 @@ class NetworkMetricTest(unittest.TestCase):
self.assertLess(GZIPPED_HTML_LEN, len(HTML_BODY))
# A plain text HTML response
- resp = network.HTTPResponse(self.MakeNetworkTimelineEvent(
+ resp = network_metrics.HTTPResponse(self.MakeNetworkTimelineEvent(
url=url,
response_headers={
'Content-Type': 'text/html',
@@ -68,7 +68,7 @@ class NetworkMetricTest(unittest.TestCase):
self.assertEqual(0.0, resp.data_saving_rate)
# A gzipped HTML response
- resp = network.HTTPResponse(self.MakeNetworkTimelineEvent(
+ resp = network_metrics.HTTPResponse(self.MakeNetworkTimelineEvent(
url=url,
response_headers={
'Content-Type': 'text/html',
@@ -87,7 +87,7 @@ class NetworkMetricTest(unittest.TestCase):
resp.data_saving_rate)
# A JPEG image response.
- resp = network.HTTPResponse(self.MakeNetworkTimelineEvent(
+ resp = network_metrics.HTTPResponse(self.MakeNetworkTimelineEvent(
url='http://test.image',
response_headers={
'Content-Type': 'image/jpeg',
@@ -107,7 +107,7 @@ class NetworkMetricTest(unittest.TestCase):
resp.data_saving_rate)
# A JPEG image response from cache.
- resp = network.HTTPResponse(self.MakeNetworkTimelineEvent(
+ resp = network_metrics.HTTPResponse(self.MakeNetworkTimelineEvent(
url='http://test.image',
response_headers={
'Content-Type': 'image/jpeg',
@@ -154,7 +154,7 @@ class NetworkMetricTest(unittest.TestCase):
body=base64.b64encode(IMAGE_BODY),
base64_encoded_body=True),
]
- metric = network.NetworkMetric()
+ metric = network_metrics.NetworkMetric()
metric._events = events
metric.compute_data_saving = True
« no previous file with comments | « tools/chrome_proxy/integration_tests/network_metrics.py ('k') | tools/chrome_proxy/run_benchmark » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698