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 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): |
| (...skipping 353 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 364 'ScrollBounceAction', is_smooth=True) | 364 'ScrollBounceAction', is_smooth=True) |
| 365 action_runner.ScrollBouncePage() | 365 action_runner.ScrollBouncePage() |
| 366 interaction.End() | 366 interaction.End() |
| 367 | 367 |
| 368 | 368 |
| 369 class ToughSchedulingCasesPageSet(page_set_module.PageSet): | 369 class ToughSchedulingCasesPageSet(page_set_module.PageSet): |
| 370 | 370 |
| 371 """ Tough scheduler latency test cases """ | 371 """ Tough scheduler latency test cases """ |
| 372 | 372 |
| 373 def __init__(self): | 373 def __init__(self): |
| 374 super(ToughSchedulingCasesPageSet, self).__init__() | 374 super(ToughSchedulingCasesPageSet, self).__init__( |
| 375 archive_data_file='data/tough_scheduling_cases.json') | |
| 375 | 376 |
| 376 # Why: Simple scrolling baseline | 377 # Why: Simple scrolling baseline |
| 377 self.AddPage(ToughSchedulingCasesPage( | 378 self.AddPage(ToughSchedulingCasesPage( |
| 378 'file://tough_scheduling_cases/simple_text_page.html', | 379 'file://tough_scheduling_cases/simple_text_page.html', |
| 379 self)) | 380 self)) |
| 380 self.AddPage(Page1(self)) | 381 self.AddPage(Page1(self)) |
| 381 self.AddPage(Page2(self)) | 382 self.AddPage(Page2(self)) |
| 382 self.AddPage(Page3(self)) | 383 self.AddPage(Page3(self)) |
| 383 self.AddPage(Page4(self)) | 384 self.AddPage(Page4(self)) |
| 384 self.AddPage(Page5(self)) | 385 self.AddPage(Page5(self)) |
| (...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 458 # Why: Scroll bounce with slow handler on desktop, blocks only once until | 459 # Why: Scroll bounce with slow handler on desktop, blocks only once until |
| 459 # ACK timeout. | 460 # ACK timeout. |
| 460 self.AddPage(EmptyTouchHandlerPage( | 461 self.AddPage(EmptyTouchHandlerPage( |
| 461 name='bounce_desktop_slow_handler', | 462 name='bounce_desktop_slow_handler', |
| 462 desktop=True, | 463 desktop=True, |
| 463 slow_handler=True, | 464 slow_handler=True, |
| 464 bounce=True, | 465 bounce=True, |
| 465 page_set=self)) | 466 page_set=self)) |
| 466 # Why: For measuring the latency of scroll-synchronized effects. | 467 # Why: For measuring the latency of scroll-synchronized effects. |
| 467 self.AddPage(SynchronizedScrollOffsetPage(page_set=self)) | 468 self.AddPage(SynchronizedScrollOffsetPage(page_set=self)) |
| 469 | |
| 470 real_pages_url_list = [ | |
| 471 'http://www.latimes.com', | |
|
Sami
2014/07/16 10:32:01
nit: This should use four spaces of indentation.
picksi
2014/07/18 09:23:07
Done.
| |
| 472 ('http://io9.com/the-10-most-shocking-characters-that-george-r-r-' + | |
| 473 'martin-1579481155/+tinaamini'), | |
| 474 'http://ftw.usatoday.com/2014/05/spelling-bee-rules-shenanigans', | |
| 475 'http://m.espn.go.com/nhl/rankings' | |
| 476 ] | |
| 477 | |
| 478 for url in real_pages_url_list: | |
| 479 self.AddPage(ToughSchedulingCasesPage(url, self)) | |
| OLD | NEW |