| 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 class SimpleScrollPage(page_module.Page): | 10 class SimpleScrollPage(page_module.Page): |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 80 credentials='facebook', | 80 credentials='facebook', |
| 81 name='Facebook') | 81 name='Facebook') |
| 82 | 82 |
| 83 def RunNavigateSteps(self, action_runner): | 83 def RunNavigateSteps(self, action_runner): |
| 84 super(Facebook, self).RunNavigateSteps(action_runner) | 84 super(Facebook, self).RunNavigateSteps(action_runner) |
| 85 action_runner.RunAction(WaitAction( | 85 action_runner.RunAction(WaitAction( |
| 86 {'condition': 'element', 'text': 'About'})) | 86 {'condition': 'element', 'text': 'About'})) |
| 87 | 87 |
| 88 | 88 |
| 89 class Top10PageSet(page_set_module.PageSet): | 89 class Top10PageSet(page_set_module.PageSet): |
| 90 """10 Pages chosen from Alexa top sites""" |
| 91 |
| 90 def __init__(self): | 92 def __init__(self): |
| 91 super(Top10PageSet, self).__init__( | 93 super(Top10PageSet, self).__init__( |
| 92 description='10 Pages chosen from Alexa top sites', | |
| 93 archive_data_file='data/top_10.json', | 94 archive_data_file='data/top_10.json', |
| 94 credentials_path='data/credentials.json', | 95 credentials_path='data/credentials.json', |
| 95 user_agent_type='desktop') | 96 user_agent_type='desktop') |
| 96 | 97 |
| 97 # top google property; a google tab is often open | 98 # top google property; a google tab is often open |
| 98 self.AddPage(Google(self)) | 99 self.AddPage(Google(self)) |
| 99 | 100 |
| 100 # productivity, top google properties | 101 # productivity, top google properties |
| 101 self.AddPage(Gmail(self)) | 102 self.AddPage(Gmail(self)) |
| 102 | 103 |
| (...skipping 14 matching lines...) Expand all Loading... |
| 117 self.AddPage(SimpleScrollPage('http://www.amazon.com', self)) | 118 self.AddPage(SimpleScrollPage('http://www.amazon.com', self)) |
| 118 | 119 |
| 119 # #4 Alexa | 120 # #4 Alexa |
| 120 self.AddPage(SimpleScrollPage('http://www.yahoo.com/', self)) | 121 self.AddPage(SimpleScrollPage('http://www.yahoo.com/', self)) |
| 121 | 122 |
| 122 # #16 Alexa | 123 # #16 Alexa |
| 123 self.AddPage(SimpleScrollPage('http://www.bing.com/', self)) | 124 self.AddPage(SimpleScrollPage('http://www.bing.com/', self)) |
| 124 | 125 |
| 125 # #20 Alexa | 126 # #20 Alexa |
| 126 self.AddPage(SimpleScrollPage('http://www.ask.com/', self)) | 127 self.AddPage(SimpleScrollPage('http://www.ask.com/', self)) |
| OLD | NEW |