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

Unified Diff: tools/perf/measurements/page_cycler_unittest.py

Issue 27486002: Cleanup of page_measurement_results object (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: keep on trying Created 7 years, 1 month 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/perf/benchmarks/peacekeeper.py ('k') | tools/perf/metrics/smoothness_unittest.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/perf/measurements/page_cycler_unittest.py
diff --git a/tools/perf/measurements/page_cycler_unittest.py b/tools/perf/measurements/page_cycler_unittest.py
index 28ed247a0bb8220275a5b64f68e4a5cb460fc010..39356ad14d684bc7818498eeccc6a760d7ed83f8 100644
--- a/tools/perf/measurements/page_cycler_unittest.py
+++ b/tools/perf/measurements/page_cycler_unittest.py
@@ -120,16 +120,18 @@ class PageCyclerUnitTest(unittest.TestCase):
self.assertEqual(max(0, i - 2), tab.clear_cache_calls,
"Iteration %d tab.clear_cache_calls %d" %
(i, tab.clear_cache_calls))
- num_results = len(results.page_results)
results.WillMeasurePage(page)
cycler.MeasurePage(page, tab, results)
+
+ values = results.page_specific_values_for_current_page
results.DidMeasurePage()
- self.assertEqual(num_results+1, len(results.page_results))
- result = results[-1]
- self.assertEqual(result.page, page)
- self.assertEqual(1, len(result.values))
- self.assertEqual(result.values[0].trace_name, 'page_load_time')
- self.assertEqual(result.values[0].units, 'ms')
- self.assertEqual(result.values[0].chart_name,
- 'warm_times' if i < 3 else 'cold_times')
+
+ self.assertEqual(1, len(values))
+ self.assertEqual(values[0].page, page)
+
+ chart_name = 'warm_times' if i > 3 else 'cold_times'
+ print values[0].name
+ self.assertEqual(values[0].name, '%s.page_load_time' % chart_name)
+ self.assertEqual(values[0].units, 'ms')
+
cycler.DidNavigateToPage(page, tab)
« no previous file with comments | « tools/perf/benchmarks/peacekeeper.py ('k') | tools/perf/metrics/smoothness_unittest.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698