Chromium Code Reviews| 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 shared_page_state | 5 from telemetry.page import shared_page_state |
| 6 from telemetry import story | 6 from telemetry import story |
| 7 | 7 |
| 8 | 8 |
| 9 class ToughSchedulingCasesPage(page_module.Page): | 9 class ToughSchedulingCasesPage(page_module.Page): |
| 10 | 10 |
| 11 def __init__(self, url, page_set): | 11 def __init__(self, url, page_set): |
| 12 super(ToughSchedulingCasesPage, self).__init__( | 12 super(ToughSchedulingCasesPage, self).__init__( |
| 13 url=url, page_set=page_set, credentials_path='data/credentials.json', | 13 url=url, page_set=page_set, credentials_path='data/credentials.json', |
| 14 shared_page_state_class=shared_page_state.SharedMobilePageState) | 14 shared_page_state_class=shared_page_state.SharedMobilePageState, |
| 15 name=url.split('/')[-1]) | |
|
nednguyen
2017/06/05 20:53:49
Does this change any of the existing names?
ashleymarie1
2017/06/06 13:49:28
Nope doesn't change any of the existing names
dis
| |
| 15 self.archive_data_file = 'data/tough_scheduling_cases.json' | 16 self.archive_data_file = 'data/tough_scheduling_cases.json' |
| 16 | 17 |
| 17 def RunPageInteractions(self, action_runner): | 18 def RunPageInteractions(self, action_runner): |
| 18 with action_runner.CreateGestureInteraction('ScrollAction'): | 19 with action_runner.CreateGestureInteraction('ScrollAction'): |
| 19 action_runner.ScrollPage() | 20 action_runner.ScrollPage() |
| 20 | 21 |
| 21 | 22 |
| 22 class Page1(ToughSchedulingCasesPage): | 23 class Page1(ToughSchedulingCasesPage): |
| 23 | 24 |
| 24 """Why: Simulate oversubscribed main thread.""" | 25 """Why: Simulate oversubscribed main thread.""" |
| (...skipping 364 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 389 action_runner.WaitForJavaScriptCondition('window.__finished') | 390 action_runner.WaitForJavaScriptCondition('window.__finished') |
| 390 | 391 |
| 391 | 392 |
| 392 class ToughSchedulingCasesPageSet(story.StorySet): | 393 class ToughSchedulingCasesPageSet(story.StorySet): |
| 393 | 394 |
| 394 """Tough scheduler latency test cases.""" | 395 """Tough scheduler latency test cases.""" |
| 395 | 396 |
| 396 def __init__(self): | 397 def __init__(self): |
| 397 super(ToughSchedulingCasesPageSet, self).__init__( | 398 super(ToughSchedulingCasesPageSet, self).__init__( |
| 398 archive_data_file='data/tough_scheduling_cases.json', | 399 archive_data_file='data/tough_scheduling_cases.json', |
| 399 cloud_storage_bucket=story.INTERNAL_BUCKET) | 400 cloud_storage_bucket=story.INTERNAL_BUCKET, |
| 401 verify_names=True) | |
| 400 | 402 |
| 401 # Why: Simple scrolling baseline | 403 # Why: Simple scrolling baseline |
| 402 self.AddStory(ToughSchedulingCasesPage( | 404 self.AddStory(ToughSchedulingCasesPage( |
| 403 'file://tough_scheduling_cases/simple_text_page.html', | 405 'file://tough_scheduling_cases/simple_text_page.html', |
| 404 self)) | 406 self)) |
| 405 self.AddStory(Page1(self)) | 407 self.AddStory(Page1(self)) |
| 406 self.AddStory(Page2(self)) | 408 self.AddStory(Page2(self)) |
| 407 self.AddStory(Page3(self)) | 409 self.AddStory(Page3(self)) |
| 408 self.AddStory(Page4(self)) | 410 self.AddStory(Page4(self)) |
| 409 # Disabled until crbug.com/413829 is fixed. | 411 # Disabled until crbug.com/413829 is fixed. |
| (...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 490 desktop=True, | 492 desktop=True, |
| 491 slow_handler=True, | 493 slow_handler=True, |
| 492 bounce=True, | 494 bounce=True, |
| 493 page_set=self)) | 495 page_set=self)) |
| 494 # Why: For measuring the latency of scroll-synchronized effects. | 496 # Why: For measuring the latency of scroll-synchronized effects. |
| 495 self.AddStory(SynchronizedScrollOffsetPage(page_set=self)) | 497 self.AddStory(SynchronizedScrollOffsetPage(page_set=self)) |
| 496 # Why: Test loading a large amount of Javascript. | 498 # Why: Test loading a large amount of Javascript. |
| 497 self.AddStory(SecondBatchJsPage(page_set=self, variant='light')) | 499 self.AddStory(SecondBatchJsPage(page_set=self, variant='light')) |
| 498 self.AddStory(SecondBatchJsPage(page_set=self, variant='medium')) | 500 self.AddStory(SecondBatchJsPage(page_set=self, variant='medium')) |
| 499 self.AddStory(SecondBatchJsPage(page_set=self, variant='heavy')) | 501 self.AddStory(SecondBatchJsPage(page_set=self, variant='heavy')) |
| OLD | NEW |