| OLD | NEW |
| 1 # Copyright 2016 The Chromium Authors. All rights reserved. | 1 # Copyright 2016 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 from page_sets.system_health import platforms | 5 from page_sets.system_health import platforms |
| 6 from page_sets.system_health import system_health_story | 6 from page_sets.system_health import system_health_story |
| 7 | 7 |
| 8 from page_sets.login_helpers import pinterest_login | 8 from page_sets.login_helpers import pinterest_login |
| 9 | 9 |
| 10 from telemetry import decorators | 10 from telemetry import decorators |
| (...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 187 | 187 |
| 188 class RedditMobileStory(_NewsBrowsingStory): | 188 class RedditMobileStory(_NewsBrowsingStory): |
| 189 """The top website in http://www.alexa.com/topsites/category/News""" | 189 """The top website in http://www.alexa.com/topsites/category/News""" |
| 190 NAME = 'browse:news:reddit' | 190 NAME = 'browse:news:reddit' |
| 191 URL = 'https://www.reddit.com/r/news/top/?sort=top&t=week' | 191 URL = 'https://www.reddit.com/r/news/top/?sort=top&t=week' |
| 192 IS_SINGLE_PAGE_APP = True | 192 IS_SINGLE_PAGE_APP = True |
| 193 ITEM_SELECTOR = '.PostHeader__post-title-line' | 193 ITEM_SELECTOR = '.PostHeader__post-title-line' |
| 194 SUPPORTED_PLATFORMS = platforms.MOBILE_ONLY | 194 SUPPORTED_PLATFORMS = platforms.MOBILE_ONLY |
| 195 | 195 |
| 196 | 196 |
| 197 @decorators.Disabled('android') # crbug.com/664515 | |
| 198 class TwitterMobileStory(_NewsBrowsingStory): | 197 class TwitterMobileStory(_NewsBrowsingStory): |
| 199 NAME = 'browse:social:twitter' | 198 NAME = 'browse:social:twitter' |
| 200 URL = 'https://www.twitter.com/nasa' | 199 URL = 'https://www.twitter.com/nasa' |
| 201 ITEM_SELECTOR = '.Tweet-text' | 200 ITEM_SELECTOR = '.Tweet-text' |
| 202 SUPPORTED_PLATFORMS = platforms.MOBILE_ONLY | 201 SUPPORTED_PLATFORMS = platforms.MOBILE_ONLY |
| 203 | 202 |
| 204 | 203 |
| 205 @decorators.Disabled('win', # crbug.com/662971 | 204 @decorators.Disabled('win', # crbug.com/662971 |
| 206 'mac') # crbug.com/664661, crbug.com/663025 | 205 'mac') # crbug.com/664661, crbug.com/663025 |
| 207 class TwitterDesktopStory(_NewsBrowsingStory): | 206 class TwitterDesktopStory(_NewsBrowsingStory): |
| (...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 371 inner_save_function = 'document.querySelector(".nameAndIcons")' | 370 inner_save_function = 'document.querySelector(".nameAndIcons")' |
| 372 action_runner.WaitForElement(element_function=inner_save_function) | 371 action_runner.WaitForElement(element_function=inner_save_function) |
| 373 action_runner.ClickElement(element_function=inner_save_function) | 372 action_runner.ClickElement(element_function=inner_save_function) |
| 374 action_runner.Wait(1) # Wait to make navigation realistic. | 373 action_runner.Wait(1) # Wait to make navigation realistic. |
| 375 | 374 |
| 376 # Close selection. | 375 # Close selection. |
| 377 x_element_function = ('document.querySelector(' | 376 x_element_function = ('document.querySelector(' |
| 378 '".Button.borderless.close.visible")') | 377 '".Button.borderless.close.visible")') |
| 379 action_runner.ClickElement(element_function=x_element_function) | 378 action_runner.ClickElement(element_function=x_element_function) |
| 380 action_runner.Wait(1) # Wait to make navigation realistic. | 379 action_runner.Wait(1) # Wait to make navigation realistic. |
| OLD | NEW |