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

Side by Side Diff: tools/perf/measurements/smoothness_unittest.py

Issue 1139823002: [Telemetry] Remove page_test.DidRunActions hook. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove WillRunTests in telemetry/ Created 5 years, 7 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 unified diff | Download patch
« no previous file with comments | « tools/perf/measurements/oilpan_gc_times.py ('k') | tools/perf/measurements/thread_times.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright 2013 The Chromium Authors. All rights reserved. 1 # Copyright 2013 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 import sys 4 import sys
5 5
6 from telemetry.core import wpr_modes 6 from telemetry.core import wpr_modes
7 from telemetry import decorators 7 from telemetry import decorators
8 from telemetry.page import page 8 from telemetry.page import page
9 from telemetry.unittest_util import options_for_unittests 9 from telemetry.unittest_util import options_for_unittests
10 from telemetry.unittest_util import page_test_test_case 10 from telemetry.unittest_util import page_test_test_case
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 test_page.synthetic_delays = { 52 test_page.synthetic_delays = {
53 'cc.BeginMainFrame': { 'target_duration': 0.012 }, 53 'cc.BeginMainFrame': { 'target_duration': 0.012 },
54 'cc.DrawAndSwap': { 'target_duration': 0.012, 'mode': 'alternating' }, 54 'cc.DrawAndSwap': { 'target_duration': 0.012, 'mode': 'alternating' },
55 'gpu.PresentingFrame': { 'target_duration': 0.012 } 55 'gpu.PresentingFrame': { 'target_duration': 0.012 }
56 } 56 }
57 57
58 tab = FakeTab() 58 tab = FakeTab()
59 measurement = smoothness.Smoothness() 59 measurement = smoothness.Smoothness()
60 measurement.WillStartBrowser(tab.browser.platform) 60 measurement.WillStartBrowser(tab.browser.platform)
61 measurement.WillNavigateToPage(test_page, tab) 61 measurement.WillNavigateToPage(test_page, tab)
62 measurement.WillRunActions(test_page, tab)
63 62
64 expected_synthetic_delay = set([ 63 expected_synthetic_delay = set([
65 'DELAY(cc.BeginMainFrame;0.012000;static)', 64 'DELAY(cc.BeginMainFrame;0.012000;static)',
66 'DELAY(cc.DrawAndSwap;0.012000;alternating)', 65 'DELAY(cc.DrawAndSwap;0.012000;alternating)',
67 'DELAY(gpu.PresentingFrame;0.012000;static)', 66 'DELAY(gpu.PresentingFrame;0.012000;static)',
68 ]) 67 ])
69 tracing_controller = tab.browser.platform.tracing_controller 68 tracing_controller = tab.browser.platform.tracing_controller
70 actual_synthetic_delay = ( 69 actual_synthetic_delay = (
71 tracing_controller.category_filter.synthetic_delays) 70 tracing_controller.category_filter.synthetic_delays)
72 71
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
131 max_frame_delay = results.FindAllPageSpecificValuesNamed('max_frame_delay') 130 max_frame_delay = results.FindAllPageSpecificValuesNamed('max_frame_delay')
132 self.assertEquals(1, len(max_frame_delay)) 131 self.assertEquals(1, len(max_frame_delay))
133 self.assertGreater(max_frame_delay[0].GetRepresentativeNumber, 0) 132 self.assertGreater(max_frame_delay[0].GetRepresentativeNumber, 0)
134 133
135 frame_lengths = results.FindAllPageSpecificValuesNamed('frame_lengths') 134 frame_lengths = results.FindAllPageSpecificValuesNamed('frame_lengths')
136 self.assertEquals(1, len(frame_lengths)) 135 self.assertEquals(1, len(frame_lengths))
137 self.assertGreater(frame_lengths[0].GetRepresentativeNumber, 0) 136 self.assertGreater(frame_lengths[0].GetRepresentativeNumber, 0)
138 137
139 def testCleanUpTrace(self): 138 def testCleanUpTrace(self):
140 self.TestTracingCleanedUp(smoothness.Smoothness, self._options) 139 self.TestTracingCleanedUp(smoothness.Smoothness, self._options)
OLDNEW
« no previous file with comments | « tools/perf/measurements/oilpan_gc_times.py ('k') | tools/perf/measurements/thread_times.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698