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.WaitForJavaScriptCondition2( | 53 action_runner.WaitForJavaScriptCondition( |
54 'performance.timing.loadEventStart > 0') | 54 'performance.timing.loadEventStart > 0') |
55 return | 55 return |
56 with action_runner.CreateGestureInteraction('ScrollAction'): | 56 with action_runner.CreateGestureInteraction('ScrollAction'): |
57 action_runner.ScrollPage() | 57 action_runner.ScrollPage() |
58 | 58 |
59 | 59 |
60 class Typical25PageSet(story.StorySet): | 60 class Typical25PageSet(story.StorySet): |
61 | 61 |
62 """ Pages designed to represent the median, not highly optimized web """ | 62 """ Pages designed to represent the median, not highly optimized web """ |
63 | 63 |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
105 'http://www.airbnb.com/', | 105 'http://www.airbnb.com/', |
106 'http://www.ign.com/', | 106 'http://www.ign.com/', |
107 # Why: Alexa health #25 | 107 # Why: Alexa health #25 |
108 'http://www.fda.gov', | 108 'http://www.fda.gov', |
109 ] | 109 ] |
110 | 110 |
111 for url in urls_list: | 111 for url in urls_list: |
112 for temp in cache_temperatures: | 112 for temp in cache_temperatures: |
113 self.AddStory(page_class( | 113 self.AddStory(page_class( |
114 url, self, run_no_page_interactions, cache_temperature=temp)) | 114 url, self, run_no_page_interactions, cache_temperature=temp)) |
OLD | NEW |