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

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

Issue 820063003: [Telemetry] Rename RunRepaint to RunPageInteractions (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: RunPageInteractionsness -> RunPageInteractions Created 5 years, 12 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/repaint.py ('k') | tools/perf/page_sets/key_mobile_sites_repaint.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 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 from measurements import repaint 5 from measurements import repaint
6 from telemetry import decorators 6 from telemetry import decorators
7 from telemetry.core import wpr_modes 7 from telemetry.core import wpr_modes
8 from telemetry.page import page as page_module 8 from telemetry.page import page as page_module
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
11 11
12 12
13 class TestRepaintPage(page_module.Page): 13 class TestRepaintPage(page_module.Page):
14 def __init__(self, page_set, base_dir): 14 def __init__(self, page_set, base_dir):
15 super(TestRepaintPage, self).__init__('file://blank.html', 15 super(TestRepaintPage, self).__init__('file://blank.html',
16 page_set, base_dir) 16 page_set, base_dir)
17 17
18 def RunRepaint(self, action_runner): 18 def RunPageInteractions(self, action_runner):
19 action_runner.RepaintContinuously(seconds=2) 19 action_runner.RepaintContinuously(seconds=2)
20 20
21 21
22 class RepaintUnitTest(page_test_test_case.PageTestTestCase): 22 class RepaintUnitTest(page_test_test_case.PageTestTestCase):
23 """Smoke test for repaint measurement 23 """Smoke test for repaint measurement
24 24
25 Runs repaint measurement on a simple page and verifies 25 Runs repaint measurement on a simple page and verifies
26 that all metrics were added to the results. The test is purely functional, 26 that all metrics were added to the results. The test is purely functional,
27 i.e. it only checks if the metrics are present and non-zero. 27 i.e. it only checks if the metrics are present and non-zero.
28 """ 28 """
(...skipping 23 matching lines...) Expand all
52 self.assertGreater(frame_time_discrepancy[0].GetRepresentativeNumber(), 0) 52 self.assertGreater(frame_time_discrepancy[0].GetRepresentativeNumber(), 0)
53 53
54 percentage_smooth = results.FindAllPageSpecificValuesNamed( 54 percentage_smooth = results.FindAllPageSpecificValuesNamed(
55 'percentage_smooth') 55 'percentage_smooth')
56 self.assertEquals(len(percentage_smooth), 1) 56 self.assertEquals(len(percentage_smooth), 1)
57 self.assertGreaterEqual(percentage_smooth[0].GetRepresentativeNumber(), 0) 57 self.assertGreaterEqual(percentage_smooth[0].GetRepresentativeNumber(), 0)
58 58
59 @decorators.Disabled('android') 59 @decorators.Disabled('android')
60 def testCleanUpTrace(self): 60 def testCleanUpTrace(self):
61 self.TestTracingCleanedUp(repaint.Repaint, self._options) 61 self.TestTracingCleanedUp(repaint.Repaint, self._options)
OLDNEW
« no previous file with comments | « tools/perf/measurements/repaint.py ('k') | tools/perf/page_sets/key_mobile_sites_repaint.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698