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__(url=url, page_set=page_set) | 11 super(ToughSchedulingCasesPage, self).__init__(url=url, page_set=page_set) |
12 self.credentials_path = 'data/credentials.json' | 12 self.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 444 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
476 page_set=self)) | 482 page_set=self)) |
477 # Why: For measuring the latency of scroll-synchronized effects. | 483 # Why: For measuring the latency of scroll-synchronized effects. |
478 self.AddPage(SynchronizedScrollOffsetPage(page_set=self)) | 484 self.AddPage(SynchronizedScrollOffsetPage(page_set=self)) |
479 # Why: Good examples of poor initial scrolling | 485 # Why: Good examples of poor initial scrolling |
480 self.AddPage(ToughSchedulingCasesPage( | 486 self.AddPage(ToughSchedulingCasesPage( |
481 'http://www.latimes.com', | 487 'http://www.latimes.com', |
482 self)) | 488 self)) |
483 self.AddPage(ToughSchedulingCasesPage( | 489 self.AddPage(ToughSchedulingCasesPage( |
484 'http://m.espn.go.com/nhl/rankings', | 490 'http://m.espn.go.com/nhl/rankings', |
485 self)) | 491 self)) |
OLD | NEW |