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 # pylint: disable=W0401,W0614 | 4 # pylint: disable=W0401,W0614 |
5 from telemetry.page.actions.all_page_actions import * | 5 from telemetry.page.actions.all_page_actions import * |
6 from telemetry.page import page as page_module | 6 from telemetry.page import page as page_module |
7 from telemetry.page import page_set as page_set_module | 7 from telemetry.page import page_set as page_set_module |
8 | 8 |
9 | 9 |
10 def _GetCurrentLocation(action_runner): | 10 def _GetCurrentLocation(action_runner): |
(...skipping 13 matching lines...) Expand all Loading... |
24 self.user_agent_type = 'desktop' | 24 self.user_agent_type = 'desktop' |
25 self.archive_data_file = 'data/top_25.json' | 25 self.archive_data_file = 'data/top_25.json' |
26 | 26 |
27 def RunSmoothness(self, action_runner): | 27 def RunSmoothness(self, action_runner): |
28 interaction = action_runner.BeginGestureInteraction( | 28 interaction = action_runner.BeginGestureInteraction( |
29 'ScrollAction', is_smooth=True) | 29 'ScrollAction', is_smooth=True) |
30 action_runner.ScrollPage() | 30 action_runner.ScrollPage() |
31 interaction.End() | 31 interaction.End() |
32 | 32 |
33 def RunRepaint(self, action_runner): | 33 def RunRepaint(self, action_runner): |
34 action_runner.RunAction(RepaintContinuouslyAction( | 34 action_runner.RepaintContinuously(seconds=5) |
35 { | |
36 'seconds': 5 | |
37 })) | |
38 | 35 |
39 | 36 |
40 class GoogleWebSearchPage(Top25Page): | 37 class GoogleWebSearchPage(Top25Page): |
41 | 38 |
42 """ Why: top google property; a google tab is often open """ | 39 """ Why: top google property; a google tab is often open """ |
43 | 40 |
44 def __init__(self, page_set): | 41 def __init__(self, page_set): |
45 super(GoogleWebSearchPage, self).__init__( | 42 super(GoogleWebSearchPage, self).__init__( |
46 url='https://www.google.com/#hl=en&q=barack+obama', | 43 url='https://www.google.com/#hl=en&q=barack+obama', |
47 page_set=page_set) | 44 page_set=page_set) |
(...skipping 517 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
565 # Why: #1 Alexa reference | 562 # Why: #1 Alexa reference |
566 'http://answers.yahoo.com', | 563 'http://answers.yahoo.com', |
567 # Why: #1 Alexa sports | 564 # Why: #1 Alexa sports |
568 'http://sports.yahoo.com/', | 565 'http://sports.yahoo.com/', |
569 # Why: top tech blog | 566 # Why: top tech blog |
570 'http://techcrunch.com' | 567 'http://techcrunch.com' |
571 ] | 568 ] |
572 | 569 |
573 for url in other_urls: | 570 for url in other_urls: |
574 self.AddPage(Top25Page(url, self)) | 571 self.AddPage(Top25Page(url, self)) |
OLD | NEW |