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

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

Issue 2706483003: Add Multi-tab System Health Story (Closed)
Patch Set: Refactoring Benchmark TabSwitching Created 3 years, 10 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/perf/measurements/tab_switching.py ('k') | tools/perf/page_sets/tab_switching_cases.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/perf/measurements/tab_switching_unittest.py
diff --git a/tools/perf/measurements/tab_switching_unittest.py b/tools/perf/measurements/tab_switching_unittest.py
index 79efbb116d3ace14849a694b87153d47a8cfc774..014494541c3d9a2f8ca369d0baf019fc053b1f02 100644
--- a/tools/perf/measurements/tab_switching_unittest.py
+++ b/tools/perf/measurements/tab_switching_unittest.py
@@ -65,19 +65,6 @@ class TabSwitchingUnittest(page_test_test_case.PageTestTestCase):
expected_histogram = [
# To get first_histogram for last tab (tab_1).
'{"count": 0, "buckets": []}',
- # First _IsDone check for tab_0. Retry.
- '{"count": 0, "buckets": []}',
- # Second _IsDone check for tab_0. Retry.
- '{"count": 0, "buckets": []}',
- # Third _IsDone check for tab_0. Pass.
- '{"count": 1, "buckets": [{"low": 1, "high": 2, "count": 1}]}',
- # To get prev_histogram. End of tab_0 loop.
- '{"count": 1, "buckets": [{"low": 1, "high": 2, "count": 1}]}',
- # First _IsDone check for tab_1. Retry.
- '{"count": 1, "buckets": [{"low": 1, "high": 2, "count": 1}]}',
- # Second _IsDone check for tab_1. Pass.
- '{"count": 2, "buckets": [{"low": 1, "high": 2, "count": 1},'
- '{"low": 2, "high": 3, "count": 1}]}',
# To get prev_histogram. End of tab_1 loop.
'{"count": 2, "buckets": [{"low": 1, "high": 2, "count": 1},'
'{"low": 2, "high": 3, "count": 1}]}',
@@ -88,10 +75,11 @@ class TabSwitchingUnittest(page_test_test_case.PageTestTestCase):
mock.patch('telemetry.value.histogram_util.GetHistogram',
mock_get_histogram),
mock.patch('metrics.keychain_metric.KeychainMetric')):
+ measure.DidNavigateToPage(story_set.stories[0], browser.tabs[-1])
measure.ValidateAndMeasurePage(story_set.stories[0], browser.tabs[-1],
page_test_results.PageTestResults())
self.assertEqual(len(expected_histogram),
len(mock_get_histogram.mock_calls))
expected_calls = [mock.call(mock.ANY, mock.ANY, t) for t in
- [tab_1] + [tab_0] * 4 + [tab_1] * 3]
+ [tab_1] + [tab_1]]
self.assertEqual(expected_calls, mock_get_histogram.mock_calls)
« no previous file with comments | « tools/perf/measurements/tab_switching.py ('k') | tools/perf/page_sets/tab_switching_cases.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698