OLD | NEW |
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 from telemetry.page import page as page_module | 4 from telemetry.page import page as page_module |
5 from telemetry.page import page_set as page_set_module | 5 from telemetry.page import page_set as page_set_module |
6 | 6 |
7 | 7 |
8 class ToughSchedulingCasesPage(page_module.Page): | 8 class ToughSchedulingCasesPage(page_module.Page): |
9 | 9 |
10 def __init__(self, url, page_set): | 10 def __init__(self, url, page_set): |
11 super(ToughSchedulingCasesPage, self).__init__( | 11 super(ToughSchedulingCasesPage, self).__init__( |
12 url=url, page_set=page_set, credentials_path = 'data/credentials.json') | 12 url=url, page_set=page_set, credentials_path='data/credentials.json') |
13 self.user_agent_type = 'mobile' | 13 self.user_agent_type = 'mobile' |
14 self.archive_data_file = 'data/tough_scheduling_cases.json' | 14 self.archive_data_file = 'data/tough_scheduling_cases.json' |
15 | 15 |
16 def RunSmoothness(self, action_runner): | 16 def RunSmoothness(self, action_runner): |
17 interaction = action_runner.BeginGestureInteraction( | 17 interaction = action_runner.BeginGestureInteraction( |
18 'ScrollAction', is_smooth=True) | 18 'ScrollAction', is_smooth=True) |
19 action_runner.ScrollPage() | 19 action_runner.ScrollPage() |
20 interaction.End() | 20 interaction.End() |
21 | 21 |
| 22 def RunTaskExecutionTime(self, action_runner): |
| 23 interaction = action_runner.BeginGestureInteraction( |
| 24 'ScrollAction', is_smooth=True) |
| 25 action_runner.ScrollPage() |
| 26 interaction.End() |
| 27 |
22 | 28 |
23 class Page1(ToughSchedulingCasesPage): | 29 class Page1(ToughSchedulingCasesPage): |
24 | 30 |
25 """ Why: Simulate oversubscribed main thread """ | 31 """ Why: Simulate oversubscribed main thread """ |
26 | 32 |
27 def __init__(self, page_set): | 33 def __init__(self, page_set): |
28 super(Page1, self).__init__( | 34 super(Page1, self).__init__( |
29 url='file://tough_scheduling_cases/simple_text_page.html?main_busy', | 35 url='file://tough_scheduling_cases/simple_text_page.html?main_busy', |
30 page_set=page_set) | 36 page_set=page_set) |
31 | 37 |
(...skipping 443 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
475 page_set=self)) | 481 page_set=self)) |
476 # Why: For measuring the latency of scroll-synchronized effects. | 482 # Why: For measuring the latency of scroll-synchronized effects. |
477 self.AddPage(SynchronizedScrollOffsetPage(page_set=self)) | 483 self.AddPage(SynchronizedScrollOffsetPage(page_set=self)) |
478 # Why: Good examples of poor initial scrolling | 484 # Why: Good examples of poor initial scrolling |
479 self.AddPage(ToughSchedulingCasesPage( | 485 self.AddPage(ToughSchedulingCasesPage( |
480 'http://www.latimes.com', | 486 'http://www.latimes.com', |
481 self)) | 487 self)) |
482 self.AddPage(ToughSchedulingCasesPage( | 488 self.AddPage(ToughSchedulingCasesPage( |
483 'http://m.espn.go.com/nhl/rankings', | 489 'http://m.espn.go.com/nhl/rankings', |
484 self)) | 490 self)) |
OLD | NEW |