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 from page_sets import key_mobile_sites_pages | 7 from page_sets import key_mobile_sites_pages |
| 8 | 8 |
| 9 | 9 |
| 10 def _RepaintContinously(action_runner): | 10 def _RepaintContinously(action_runner): |
| 11 action_runner.RepaintContinuously(seconds=5) | 11 action_runner.RepaintContinuously(seconds=5) |
| 12 | 12 |
| 13 | 13 |
| 14 def _CreatePageClassWithRepaintInteractions(page_cls): | 14 def _CreatePageClassWithRepaintInteractions(page_cls): |
| 15 class DerivedRepaintPage(page_cls): # pylint: disable=W0232 | 15 class DerivedRepaintPage(page_cls): # pylint: disable=W0232 |
| 16 | 16 |
| 17 def RunRepaintness(self, action_runner): | 17 def RunPageInteractionsness(self, action_runner): |
|
sullivan
2014/12/23 16:44:25
What is the "ness" in "RunPageInteractionsness"?
nednguyen
2014/12/23 16:52:45
Err, I did a sed & turnout there was ness in as in
sullivan
2014/12/23 16:54:39
Makes sense. Should it just be RunPageInteractions
nednguyen
2014/12/23 16:56:28
Done.
| |
| 18 _RepaintContinously(action_runner) | 18 _RepaintContinously(action_runner) |
| 19 return DerivedRepaintPage | 19 return DerivedRepaintPage |
| 20 | 20 |
| 21 | 21 |
| 22 class KeyMobileSitesRepaintPage(page_module.Page): | 22 class KeyMobileSitesRepaintPage(page_module.Page): |
| 23 | 23 |
| 24 def __init__(self, url, page_set, name='', labels=None): | 24 def __init__(self, url, page_set, name='', labels=None): |
| 25 super(KeyMobileSitesRepaintPage, self).__init__( | 25 super(KeyMobileSitesRepaintPage, self).__init__( |
| 26 url=url, page_set=page_set, name=name, | 26 url=url, page_set=page_set, name=name, |
| 27 credentials_path='data/credentials.json', labels=labels) | 27 credentials_path='data/credentials.json', labels=labels) |
| 28 self.user_agent_type = 'mobile' | 28 self.user_agent_type = 'mobile' |
| 29 self.archive_data_file = 'data/key_mobile_sites_repaint.json' | 29 self.archive_data_file = 'data/key_mobile_sites_repaint.json' |
| 30 | 30 |
| 31 def RunRepaintness(self, action_runner): | 31 def RunPageInteractionsness(self, action_runner): |
| 32 _RepaintContinously(action_runner) | 32 _RepaintContinously(action_runner) |
| 33 | 33 |
| 34 | 34 |
| 35 class KeyMobileSitesRepaintPageSet(page_set_module.PageSet): | 35 class KeyMobileSitesRepaintPageSet(page_set_module.PageSet): |
| 36 | 36 |
| 37 """ Key mobile sites with repaint interactions. """ | 37 """ Key mobile sites with repaint interactions. """ |
| 38 | 38 |
| 39 def __init__(self): | 39 def __init__(self): |
| 40 super(KeyMobileSitesRepaintPageSet, self).__init__( | 40 super(KeyMobileSitesRepaintPageSet, self).__init__( |
| 41 user_agent_type='mobile', | 41 user_agent_type='mobile', |
| (...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 176 ('http://www.baidu.com/s?wd=barack+obama&rsv_bp=0&rsv_spt=3&rsv_sug3=9&' | 176 ('http://www.baidu.com/s?wd=barack+obama&rsv_bp=0&rsv_spt=3&rsv_sug3=9&' |
| 177 'rsv_sug=0&rsv_sug4=3824&rsv_sug1=3&inputT=4920'), | 177 'rsv_sug=0&rsv_sug4=3824&rsv_sug1=3&inputT=4920'), |
| 178 # Why: Top search engine | 178 # Why: Top search engine |
| 179 'http://www.bing.com/search?q=sloths', | 179 'http://www.bing.com/search?q=sloths', |
| 180 # Why: Good example of poor initial scrolling | 180 # Why: Good example of poor initial scrolling |
| 181 'http://ftw.usatoday.com/2014/05/spelling-bee-rules-shenanigans' | 181 'http://ftw.usatoday.com/2014/05/spelling-bee-rules-shenanigans' |
| 182 ] | 182 ] |
| 183 | 183 |
| 184 for url in urls_list: | 184 for url in urls_list: |
| 185 self.AddUserStory(KeyMobileSitesRepaintPage(url, self)) | 185 self.AddUserStory(KeyMobileSitesRepaintPage(url, self)) |
| OLD | NEW |