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

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

Issue 2941763004: Explicitly setting names for stories in unittests (Closed)
Patch Set: Created 3 years, 6 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
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 telemetry import decorators 5 from telemetry import decorators
6 from telemetry.internal.results import page_test_results 6 from telemetry.internal.results import page_test_results
7 from telemetry.page import page as page_module 7 from telemetry.page import page as page_module
8 from telemetry.testing import options_for_unittests 8 from telemetry.testing import options_for_unittests
9 from telemetry.testing import page_test_test_case 9 from telemetry.testing import page_test_test_case
10 from telemetry.timeline import model as model_module 10 from telemetry.timeline import model as model_module
11 from telemetry.timeline import slice as slice_data 11 from telemetry.timeline import slice as slice_data
12 from telemetry.util import wpr_modes 12 from telemetry.util import wpr_modes
13 13
14 from measurements import task_execution_time 14 from measurements import task_execution_time
15 15
16 16
17 class TestTaskExecutionTimePage(page_module.Page): 17 class TestTaskExecutionTimePage(page_module.Page):
18 18
19 def __init__(self, page_set, base_dir): 19 def __init__(self, page_set, base_dir):
20 super(TestTaskExecutionTimePage, self).__init__( 20 super(TestTaskExecutionTimePage, self).__init__(
21 'file://blank.html', page_set, base_dir) 21 'file://blank.html', page_set, base_dir, name='blank.html')
22 22
23 def RunPageInteractions(self, action_runner): 23 def RunPageInteractions(self, action_runner):
24 with action_runner.CreateGestureInteraction('ScrollAction'): 24 with action_runner.CreateGestureInteraction('ScrollAction'):
25 action_runner.ScrollPage() 25 action_runner.ScrollPage()
26 26
27 27
28 # Disable for accessing private API of task_execution_time. 28 # Disable for accessing private API of task_execution_time.
29 # pylint: disable=protected-access 29 # pylint: disable=protected-access
30 class TaskExecutionTimeUnitTest(page_test_test_case.PageTestTestCase): 30 class TaskExecutionTimeUnitTest(page_test_test_case.PageTestTestCase):
31 31
(...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after
265 None, 265 None,
266 'category', 266 'category',
267 name, 267 name,
268 timestamp, 268 timestamp,
269 duration, 269 duration,
270 timestamp, 270 timestamp,
271 duration, 271 duration,
272 []) 272 [])
273 self._renderer_thread.all_slices.append(new_slice) 273 self._renderer_thread.all_slices.append(new_slice)
274 return new_slice 274 return new_slice
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698