| 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 | 4 |
| 5 import shutil | 5 import shutil |
| 6 | 6 |
| 7 from profile_creators import profile_generator | 7 from profile_creators import profile_generator |
| 8 from telemetry.page import page as page_module | 8 from telemetry.page import page as page_module |
| 9 from telemetry.page import cache_temperature as cache_temperature_module | 9 from telemetry.page import cache_temperature as cache_temperature_module |
| 10 from telemetry.page import shared_page_state | 10 from telemetry.page import shared_page_state |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 43 shared_page_state_class=shared_page_state.SharedDesktopPageState, | 43 shared_page_state_class=shared_page_state.SharedDesktopPageState, |
| 44 cache_temperature=None): | 44 cache_temperature=None): |
| 45 super(Typical25Page, self).__init__( | 45 super(Typical25Page, self).__init__( |
| 46 url=url, page_set=page_set, | 46 url=url, page_set=page_set, |
| 47 shared_page_state_class=shared_page_state_class, | 47 shared_page_state_class=shared_page_state_class, |
| 48 cache_temperature=cache_temperature) | 48 cache_temperature=cache_temperature) |
| 49 self._run_no_page_interactions = run_no_page_interactions | 49 self._run_no_page_interactions = run_no_page_interactions |
| 50 | 50 |
| 51 def RunPageInteractions(self, action_runner): | 51 def RunPageInteractions(self, action_runner): |
| 52 if self._run_no_page_interactions: | 52 if self._run_no_page_interactions: |
| 53 action_runner.WaitForJavaScriptCondition( |
| 54 'performance.timing.loadEventStart > 0') |
| 53 return | 55 return |
| 54 with action_runner.CreateGestureInteraction('ScrollAction'): | 56 with action_runner.CreateGestureInteraction('ScrollAction'): |
| 55 action_runner.ScrollPage() | 57 action_runner.ScrollPage() |
| 56 | 58 |
| 57 | 59 |
| 58 class Typical25PageSet(story.StorySet): | 60 class Typical25PageSet(story.StorySet): |
| 59 | 61 |
| 60 """ Pages designed to represent the median, not highly optimized web """ | 62 """ Pages designed to represent the median, not highly optimized web """ |
| 61 | 63 |
| 62 def __init__(self, run_no_page_interactions=False, | 64 def __init__(self, run_no_page_interactions=False, |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 106 'http://www.airbnb.com/', | 108 'http://www.airbnb.com/', |
| 107 'http://www.ign.com/', | 109 'http://www.ign.com/', |
| 108 # Why: Alexa health #25 | 110 # Why: Alexa health #25 |
| 109 'http://www.fda.gov', | 111 'http://www.fda.gov', |
| 110 ] | 112 ] |
| 111 | 113 |
| 112 for url in urls_list: | 114 for url in urls_list: |
| 113 for temp in cache_temperatures: | 115 for temp in cache_temperatures: |
| 114 self.AddStory(page_class( | 116 self.AddStory(page_class( |
| 115 url, self, run_no_page_interactions, cache_temperature=temp)) | 117 url, self, run_no_page_interactions, cache_temperature=temp)) |
| OLD | NEW |