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

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

Issue 2850483002: Fix the repaint disabling decorator to be consistent with Telemetry disabling style (Closed)
Patch Set: Created 3 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 | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright 2014 The Chromium Authors. All rights reserved. 1 # Copyright 2014 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 unittest
6
7 from telemetry import decorators 5 from telemetry import decorators
8 from telemetry.page import page as page_module 6 from telemetry.page import page as page_module
9 from telemetry.testing import options_for_unittests 7 from telemetry.testing import options_for_unittests
10 from telemetry.testing import page_test_test_case 8 from telemetry.testing import page_test_test_case
11 from telemetry.util import wpr_modes 9 from telemetry.util import wpr_modes
12 10
13 from measurements import smoothness 11 from measurements import smoothness
14 from page_sets import repaint_helpers 12 from page_sets import repaint_helpers
15 13
16 14
(...skipping 13 matching lines...) Expand all
30 Runs repaint measurement on a simple page and verifies 28 Runs repaint measurement on a simple page and verifies
31 that all metrics were added to the results. The test is purely functional, 29 that all metrics were added to the results. The test is purely functional,
32 i.e. it only checks if the metrics are present and non-zero. 30 i.e. it only checks if the metrics are present and non-zero.
33 """ 31 """
34 32
35 def setUp(self): 33 def setUp(self):
36 self._options = options_for_unittests.GetCopy() 34 self._options = options_for_unittests.GetCopy()
37 self._options.browser_options.wpr_mode = wpr_modes.WPR_OFF 35 self._options.browser_options.wpr_mode = wpr_modes.WPR_OFF
38 36
39 # Previously this test was disabled on chromeos, see crbug.com/483212. 37 # Previously this test was disabled on chromeos, see crbug.com/483212.
40 @unittest.skip("flaky") # crbug.com/715962 38 @decorators.Disabled("all") # crbug.com/715962
41 def testRepaint(self): 39 def testRepaint(self):
42 ps = self.CreateEmptyPageSet() 40 ps = self.CreateEmptyPageSet()
43 ps.AddStory(TestRepaintPage(ps, ps.base_dir)) 41 ps.AddStory(TestRepaintPage(ps, ps.base_dir))
44 measurement = smoothness.Repaint() 42 measurement = smoothness.Repaint()
45 results = self.RunMeasurement(measurement, ps, options=self._options) 43 results = self.RunMeasurement(measurement, ps, options=self._options)
46 self.assertEquals(0, len(results.failures)) 44 self.assertEquals(0, len(results.failures))
47 45
48 frame_times = results.FindAllPageSpecificValuesNamed('frame_times') 46 frame_times = results.FindAllPageSpecificValuesNamed('frame_times')
49 self.assertEquals(len(frame_times), 1) 47 self.assertEquals(len(frame_times), 1)
50 self.assertGreater(frame_times[0].GetRepresentativeNumber(), 0) 48 self.assertGreater(frame_times[0].GetRepresentativeNumber(), 0)
(...skipping 14 matching lines...) Expand all
65 63
66 # Make sure that we don't have extra timeline based metrics that are not 64 # Make sure that we don't have extra timeline based metrics that are not
67 # related to smoothness. 65 # related to smoothness.
68 mainthread_jank = results.FindAllPageSpecificValuesNamed( 66 mainthread_jank = results.FindAllPageSpecificValuesNamed(
69 'responsive-total_big_jank_thread_time') 67 'responsive-total_big_jank_thread_time')
70 self.assertEquals(len(mainthread_jank), 0) 68 self.assertEquals(len(mainthread_jank), 0)
71 69
72 @decorators.Disabled('android') 70 @decorators.Disabled('android')
73 def testCleanUpTrace(self): 71 def testCleanUpTrace(self):
74 self.TestTracingCleanedUp(smoothness.Repaint, self._options) 72 self.TestTracingCleanedUp(smoothness.Repaint, self._options)
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698