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

Side by Side Diff: tools/chrome_proxy/live_tests/chrome_proxy_measurements.py

Issue 2539973004: Update reference to page_test module to use legacy_page_test module (Closed)
Patch Set: update Created 4 years 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 unified diff | Download patch
OLDNEW
1 # Copyright 2015 The Chromium Authors. All rights reserved. 1 # Copyright 2015 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 import logging 5 import logging
6 6
7 import chrome_proxy_metrics as metrics 7 import chrome_proxy_metrics as metrics
8 from common import chrome_proxy_measurements as measurements 8 from common import chrome_proxy_measurements as measurements
9 from telemetry.core import exceptions 9 from telemetry.core import exceptions
10 from telemetry.page import page_test 10 from telemetry.page import legacy_page_test
11 11
12 class ChromeProxyLatencyBase(page_test.PageTest): 12 class ChromeProxyLatencyBase(legacy_page_test.LegacyPageTest):
13 """Chrome latency measurement.""" 13 """Chrome latency measurement."""
14 14
15 def __init__(self, *args, **kwargs): 15 def __init__(self, *args, **kwargs):
16 super(ChromeProxyLatencyBase, self).__init__(*args, **kwargs) 16 super(ChromeProxyLatencyBase, self).__init__(*args, **kwargs)
17 self._metrics = metrics.ChromeProxyMetric() 17 self._metrics = metrics.ChromeProxyMetric()
18 18
19 def WillNavigateToPage(self, page, tab): 19 def WillNavigateToPage(self, page, tab):
20 tab.ClearCache(force=True) 20 tab.ClearCache(force=True)
21 self._metrics.Start(page, tab) 21 self._metrics.Start(page, tab)
22 22
(...skipping 19 matching lines...) Expand all
42 options.AppendExtraBrowserArgs('--enable-spdy-proxy-auth') 42 options.AppendExtraBrowserArgs('--enable-spdy-proxy-auth')
43 43
44 44
45 class ChromeProxyLatencyDirect(ChromeProxyLatencyBase): 45 class ChromeProxyLatencyDirect(ChromeProxyLatencyBase):
46 """Direct connection latency measurement.""" 46 """Direct connection latency measurement."""
47 47
48 def __init__(self, *args, **kwargs): 48 def __init__(self, *args, **kwargs):
49 super(ChromeProxyLatencyDirect, self).__init__(*args, **kwargs) 49 super(ChromeProxyLatencyDirect, self).__init__(*args, **kwargs)
50 50
51 51
52 class ChromeProxyDataSavingBase(page_test.PageTest): 52 class ChromeProxyDataSavingBase(legacy_page_test.LegacyPageTest):
53 """Chrome data saving measurement.""" 53 """Chrome data saving measurement."""
54 def __init__(self, *args, **kwargs): 54 def __init__(self, *args, **kwargs):
55 super(ChromeProxyDataSavingBase, self).__init__(*args, **kwargs) 55 super(ChromeProxyDataSavingBase, self).__init__(*args, **kwargs)
56 self._metrics = metrics.ChromeProxyMetric() 56 self._metrics = metrics.ChromeProxyMetric()
57 57
58 def WillNavigateToPage(self, page, tab): 58 def WillNavigateToPage(self, page, tab):
59 tab.ClearCache(force=True) 59 tab.ClearCache(force=True)
60 self._metrics.Start(page, tab) 60 self._metrics.Start(page, tab)
61 61
62 def ValidateAndMeasurePage(self, page, tab, results): 62 def ValidateAndMeasurePage(self, page, tab, results):
(...skipping 15 matching lines...) Expand all
78 def WillNavigateToPage(self, page, tab): 78 def WillNavigateToPage(self, page, tab):
79 measurements.WaitForViaHeader(tab) 79 measurements.WaitForViaHeader(tab)
80 super(ChromeProxyDataSaving, self).WillNavigateToPage(page, tab) 80 super(ChromeProxyDataSaving, self).WillNavigateToPage(page, tab)
81 81
82 82
83 class ChromeProxyDataSavingDirect(ChromeProxyDataSavingBase): 83 class ChromeProxyDataSavingDirect(ChromeProxyDataSavingBase):
84 """Direct connection data saving measurement.""" 84 """Direct connection data saving measurement."""
85 85
86 def __init__(self, *args, **kwargs): 86 def __init__(self, *args, **kwargs):
87 super(ChromeProxyDataSavingDirect, self).__init__(*args, **kwargs) 87 super(ChromeProxyDataSavingDirect, self).__init__(*args, **kwargs)
OLDNEW
« no previous file with comments | « tools/chrome_proxy/integration_tests/chrome_proxy_metrics.py ('k') | tools/chrome_proxy/live_tests/chrome_proxy_metrics.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698