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

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

Issue 797003002: Replaced @benchmark.Enabled/Disabled and @test.Enabled/Disabled with @decorators.Enabled/Disabled i… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fixed some bad imports Created 6 years 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
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 thread_times 5 from measurements import thread_times
6 from measurements import smoothness_unittest 6 from measurements import smoothness_unittest
7 from metrics import timeline 7 from metrics import timeline
8 from telemetry import decorators
8 from telemetry.core import wpr_modes 9 from telemetry.core import wpr_modes
9 from telemetry.unittest_util import options_for_unittests 10 from telemetry.unittest_util import options_for_unittests
10 from telemetry.unittest_util import page_test_test_case 11 from telemetry.unittest_util import page_test_test_case
11 from telemetry.unittest_util import test
12 12
13 13
14 14
15 class ThreadTimesUnitTest(page_test_test_case.PageTestTestCase): 15 class ThreadTimesUnitTest(page_test_test_case.PageTestTestCase):
16 def setUp(self): 16 def setUp(self):
17 self._options = options_for_unittests.GetCopy() 17 self._options = options_for_unittests.GetCopy()
18 self._options.browser_options.wpr_mode = wpr_modes.WPR_OFF 18 self._options.browser_options.wpr_mode = wpr_modes.WPR_OFF
19 19
20 @test.Disabled('android') 20 @decorators.Disabled('android')
21 def testBasic(self): 21 def testBasic(self):
22 ps = self.CreatePageSetFromFileInUnittestDataDir('scrollable_page.html') 22 ps = self.CreatePageSetFromFileInUnittestDataDir('scrollable_page.html')
23 measurement = thread_times.ThreadTimes() 23 measurement = thread_times.ThreadTimes()
24 timeline_options = self._options 24 timeline_options = self._options
25 results = self.RunMeasurement(measurement, ps, options = timeline_options) 25 results = self.RunMeasurement(measurement, ps, options = timeline_options)
26 self.assertEquals(0, len(results.failures)) 26 self.assertEquals(0, len(results.failures))
27 27
28 for category in timeline.TimelineThreadCategories.values(): 28 for category in timeline.TimelineThreadCategories.values():
29 cpu_time_name = timeline.ThreadCpuTimeResultName(category) 29 cpu_time_name = timeline.ThreadCpuTimeResultName(category)
30 cpu_time = results.FindAllPageSpecificValuesNamed(cpu_time_name) 30 cpu_time = results.FindAllPageSpecificValuesNamed(cpu_time_name)
(...skipping 21 matching lines...) Expand all
52 52
53 main_thread = "renderer_main" 53 main_thread = "renderer_main"
54 expected_trace_categories = ["blink", "cc", "idle"] 54 expected_trace_categories = ["blink", "cc", "idle"]
55 for trace_category in expected_trace_categories: 55 for trace_category in expected_trace_categories:
56 value_name = timeline.ThreadDetailResultName(main_thread, trace_category) 56 value_name = timeline.ThreadDetailResultName(main_thread, trace_category)
57 values = results.FindAllPageSpecificValuesNamed(value_name) 57 values = results.FindAllPageSpecificValuesNamed(value_name)
58 self.assertEquals(len(values), 1) 58 self.assertEquals(len(values), 1)
59 59
60 def testCleanUpTrace(self): 60 def testCleanUpTrace(self):
61 self.TestTracingCleanedUp(thread_times.ThreadTimes, self._options) 61 self.TestTracingCleanedUp(thread_times.ThreadTimes, self._options)
OLDNEW
« no previous file with comments | « tools/perf/measurements/smoothness_unittest.py ('k') | tools/telemetry/telemetry/core/backends/chrome/cros_unittest.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698