| 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 page_set as page_set_module | 5 from telemetry.page import page_set as page_set_module |
| 6 | 6 |
| 7 | 7 |
| 8 def _GetCurrentLocation(action_runner): | 8 def _GetCurrentLocation(action_runner): |
| 9 return action_runner.EvaluateJavaScript('document.location.href') | 9 return action_runner.EvaluateJavaScript('document.location.href') |
| 10 | 10 |
| (...skipping 281 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 292 action_runner.ScrollPage() | 292 action_runner.ScrollPage() |
| 293 interaction.End() | 293 interaction.End() |
| 294 | 294 |
| 295 | 295 |
| 296 class FacebookPage(Top7StressPage): | 296 class FacebookPage(Top7StressPage): |
| 297 | 297 |
| 298 """ Why: top social,Public profile """ | 298 """ Why: top social,Public profile """ |
| 299 | 299 |
| 300 def __init__(self, page_set): | 300 def __init__(self, page_set): |
| 301 super(FacebookPage, self).__init__( | 301 super(FacebookPage, self).__init__( |
| 302 url='https://www.facebook.com/barackobama', | 302 url='http://www.facebook.com/barackobama', |
| 303 page_set=page_set, | 303 page_set=page_set, |
| 304 name='Facebook') | 304 name='Facebook') |
| 305 self.credentials = 'facebook2' | 305 self.credentials = 'facebook' |
| 306 | 306 |
| 307 def RunNavigateSteps(self, action_runner): | 307 def RunNavigateSteps(self, action_runner): |
| 308 super(FacebookPage, self).RunNavigateSteps(action_runner) | 308 super(FacebookPage, self).RunNavigateSteps(action_runner) |
| 309 action_runner.WaitForElement(text='About') | 309 action_runner.WaitForElement(text='About') |
| 310 | 310 |
| 311 def RunPageInteractions(self, action_runner): | 311 def RunPageInteractions(self, action_runner): |
| 312 # Scroll and wait for the next page to be loaded. | 312 # Scroll and wait for the next page to be loaded. |
| 313 interaction = action_runner.BeginGestureInteraction( | 313 interaction = action_runner.BeginGestureInteraction( |
| 314 'ScrollAction', is_smooth=True) | 314 'ScrollAction', is_smooth=True) |
| 315 action_runner.ScrollPage() | 315 action_runner.ScrollPage() |
| (...skipping 21 matching lines...) Expand all Loading... |
| 337 archive_data_file='data/top_7_stress.json', | 337 archive_data_file='data/top_7_stress.json', |
| 338 bucket=page_set_module.PARTNER_BUCKET) | 338 bucket=page_set_module.PARTNER_BUCKET) |
| 339 | 339 |
| 340 self.AddUserStory(GoogleWebSearchPage(self)) | 340 self.AddUserStory(GoogleWebSearchPage(self)) |
| 341 self.AddUserStory(GmailPage(self)) | 341 self.AddUserStory(GmailPage(self)) |
| 342 self.AddUserStory(GoogleCalendarPage(self)) | 342 self.AddUserStory(GoogleCalendarPage(self)) |
| 343 self.AddUserStory(GooglePlusPage(self)) | 343 self.AddUserStory(GooglePlusPage(self)) |
| 344 self.AddUserStory(BlogspotPage(self)) | 344 self.AddUserStory(BlogspotPage(self)) |
| 345 self.AddUserStory(WordpressPage(self)) | 345 self.AddUserStory(WordpressPage(self)) |
| 346 self.AddUserStory(FacebookPage(self)) | 346 self.AddUserStory(FacebookPage(self)) |
| OLD | NEW |