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 import story |
4 from telemetry.page import page as page_module | 5 from telemetry.page import page as page_module |
5 from telemetry.page import page_set as page_set_module | |
6 from telemetry.page import shared_page_state | 6 from telemetry.page import shared_page_state |
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 self.archive_data_file = 'data/tough_scheduling_cases.json' | 15 self.archive_data_file = 'data/tough_scheduling_cases.json' |
(...skipping 366 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
382 with action_runner.CreateGestureInteraction('LoadAction'): | 382 with action_runner.CreateGestureInteraction('LoadAction'): |
383 action_runner.ExecuteJavaScript('kickOffLoading()') | 383 action_runner.ExecuteJavaScript('kickOffLoading()') |
384 action_runner.WaitForJavaScriptCondition('window.__ready') | 384 action_runner.WaitForJavaScriptCondition('window.__ready') |
385 # Click one second after the resources have finished loading. | 385 # Click one second after the resources have finished loading. |
386 action_runner.Wait(1) | 386 action_runner.Wait(1) |
387 action_runner.TapElement(selector='input[id="run"]') | 387 action_runner.TapElement(selector='input[id="run"]') |
388 # Wait for the test to complete. | 388 # Wait for the test to complete. |
389 action_runner.WaitForJavaScriptCondition('window.__finished') | 389 action_runner.WaitForJavaScriptCondition('window.__finished') |
390 | 390 |
391 | 391 |
392 class ToughSchedulingCasesPageSet(page_set_module.PageSet): | 392 class ToughSchedulingCasesPageSet(story.StorySet): |
393 | 393 |
394 """Tough scheduler latency test cases.""" | 394 """Tough scheduler latency test cases.""" |
395 | 395 |
396 def __init__(self): | 396 def __init__(self): |
397 super(ToughSchedulingCasesPageSet, self).__init__( | 397 super(ToughSchedulingCasesPageSet, self).__init__( |
398 archive_data_file='data/tough_scheduling_cases.json', | 398 archive_data_file='data/tough_scheduling_cases.json', |
399 bucket=page_set_module.INTERNAL_BUCKET) | 399 cloud_storage_bucket=story.INTERNAL_BUCKET) |
400 | 400 |
401 # Why: Simple scrolling baseline | 401 # Why: Simple scrolling baseline |
402 self.AddUserStory(ToughSchedulingCasesPage( | 402 self.AddUserStory(ToughSchedulingCasesPage( |
403 'file://tough_scheduling_cases/simple_text_page.html', | 403 'file://tough_scheduling_cases/simple_text_page.html', |
404 self)) | 404 self)) |
405 self.AddUserStory(Page1(self)) | 405 self.AddUserStory(Page1(self)) |
406 self.AddUserStory(Page2(self)) | 406 self.AddUserStory(Page2(self)) |
407 self.AddUserStory(Page3(self)) | 407 self.AddUserStory(Page3(self)) |
408 self.AddUserStory(Page4(self)) | 408 self.AddUserStory(Page4(self)) |
409 # Disabled until crbug.com/413829 is fixed. | 409 # Disabled until crbug.com/413829 is fixed. |
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
490 desktop=True, | 490 desktop=True, |
491 slow_handler=True, | 491 slow_handler=True, |
492 bounce=True, | 492 bounce=True, |
493 page_set=self)) | 493 page_set=self)) |
494 # Why: For measuring the latency of scroll-synchronized effects. | 494 # Why: For measuring the latency of scroll-synchronized effects. |
495 self.AddUserStory(SynchronizedScrollOffsetPage(page_set=self)) | 495 self.AddUserStory(SynchronizedScrollOffsetPage(page_set=self)) |
496 # Why: Test loading a large amount of Javascript. | 496 # Why: Test loading a large amount of Javascript. |
497 self.AddUserStory(SecondBatchJsPage(page_set=self, variant='light')) | 497 self.AddUserStory(SecondBatchJsPage(page_set=self, variant='light')) |
498 self.AddUserStory(SecondBatchJsPage(page_set=self, variant='medium')) | 498 self.AddUserStory(SecondBatchJsPage(page_set=self, variant='medium')) |
499 self.AddUserStory(SecondBatchJsPage(page_set=self, variant='heavy')) | 499 self.AddUserStory(SecondBatchJsPage(page_set=self, variant='heavy')) |
OLD | NEW |