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 shared_page_state | 5 from telemetry.page import shared_page_state |
6 from telemetry import story | 6 from telemetry import story |
7 | 7 |
8 from page_sets import repaint_helpers | 8 from page_sets import repaint_helpers |
9 from page_sets import top_pages | 9 from page_sets import top_pages |
10 | 10 |
(...skipping 11 matching lines...) Expand all Loading... |
22 self._mode = mode | 22 self._mode = mode |
23 self._width = width | 23 self._width = width |
24 self._height = height | 24 self._height = height |
25 | 25 |
26 def RunPageInteractions(self, action_runner): | 26 def RunPageInteractions(self, action_runner): |
27 repaint_helpers.Repaint( | 27 repaint_helpers.Repaint( |
28 action_runner, mode=self._mode, width=self._width, height=self._height) | 28 action_runner, mode=self._mode, width=self._width, height=self._height) |
29 | 29 |
30 | 30 |
31 def _CreatePageClassWithRepaintInteractions(page_cls, mode, width, height): | 31 def _CreatePageClassWithRepaintInteractions(page_cls, mode, width, height): |
32 class DerivedRepaintPage(page_cls): # pylint: disable=W0232 | 32 class DerivedRepaintPage(page_cls): # pylint: disable=no-init |
33 | 33 |
34 def RunPageInteractions(self, action_runner): | 34 def RunPageInteractions(self, action_runner): |
35 repaint_helpers.Repaint( | 35 repaint_helpers.Repaint( |
36 action_runner, mode=mode, width=width, height=height) | 36 action_runner, mode=mode, width=width, height=height) |
37 | 37 |
38 return DerivedRepaintPage | 38 return DerivedRepaintPage |
39 | 39 |
40 | 40 |
41 class Top25RepaintPageSet(story.StorySet): | 41 class Top25RepaintPageSet(story.StorySet): |
42 | 42 |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
88 'http://answers.yahoo.com', | 88 'http://answers.yahoo.com', |
89 # Why: #1 Alexa sports | 89 # Why: #1 Alexa sports |
90 'http://sports.yahoo.com/', | 90 'http://sports.yahoo.com/', |
91 # Why: top tech blog | 91 # Why: top tech blog |
92 'http://techcrunch.com' | 92 'http://techcrunch.com' |
93 ] | 93 ] |
94 | 94 |
95 for url in other_urls: | 95 for url in other_urls: |
96 self.AddStory( | 96 self.AddStory( |
97 TopRepaintPage(url, self, mode=mode, height=height, width=width)) | 97 TopRepaintPage(url, self, mode=mode, height=height, width=width)) |
OLD | NEW |