Commit 3509bfc1 authored by Santiago Aboy Solanes's avatar Santiago Aboy Solanes Committed by Commit Bot

Add browse:news:reddit:2019 system health story

This CL was created automatically with tools/perf/update_wpr script

R=perezju@chromium.org

Bug: 878390
Change-Id: I2ff70c83ba5bc3e2e0f482ab188c3c5992bad4c7
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1815123
Commit-Queue: Santiago Aboy Solanes <solanes@chromium.org>
Auto-Submit: Santiago Aboy Solanes <solanes@chromium.org>
Reviewed-by: default avatarJuan Antonio Navarro Pérez <perezju@chromium.org>
Cr-Commit-Position: refs/heads/master@{#699332}
parent 68534140
......@@ -42,6 +42,7 @@ _DISABLED_TESTS = frozenset({
'system_health.memory_mobile/browse:tech:discourse_infinite_scroll',
'system_health.memory_mobile/browse:social:facebook_infinite_scroll',
'system_health.memory_mobile/browse:social:instagram',
'system_health.memory_mobile/browse:news:reddit',
'system_health.memory_mobile/browse:social:tumblr_infinite_scroll',
'system_health.memory_mobile/browse:tools:maps',
'system_health.memory_mobile/browse:news:cnn',
......
......@@ -63,6 +63,9 @@
"browse:news:reddit": {
"DEFAULT": "system_health_mobile_027.wprgo"
},
"browse:news:reddit:2019": {
"DEFAULT": "system_health_mobile_1a5563286a.wprgo"
},
"browse:news:toi": {
"DEFAULT": "system_health_mobile_064.wprgo"
},
......
1a5563286a468da721755207026403338f629d23
\ No newline at end of file
......@@ -238,6 +238,30 @@ class RedditMobileStory(_ArticleBrowsingStory):
SUPPORTED_PLATFORMS = platforms.MOBILE_ONLY
TAGS = [story_tags.YEAR_2016]
class RedditMobileStory2019(_ArticleBrowsingStory):
NAME = 'browse:news:reddit:2019'
URL = 'https://www.reddit.com/r/news/top/?sort=top&t=week'
IS_SINGLE_PAGE_APP = True
ITEM_SELECTOR = '.PostHeader__post-title-line'
SUPPORTED_PLATFORMS = platforms.MOBILE_ONLY
TAGS = [story_tags.YEAR_2019]
def _DidLoadDocument(self, action_runner):
# We encountered ads disguised as articles on the Reddit one so far. The
# following code skips that ad.
# If we encounter it more often it will make sense to have a more generic
# approach, e.g an OFFSET to start iterating from, or an index to skip.
# Add one to the items to visit since we are going to skip the ad and we
# want to still visit the same amount of articles.
for i in xrange(self.ITEMS_TO_VISIT + 1):
# Skip the ad disguised as an article.
if i == 1:
continue
self._NavigateToItem(action_runner, i)
self._ReadNextArticle(action_runner)
self._NavigateBack(action_runner)
self._ScrollMainPage(action_runner)
class TwitterMobileStory(_ArticleBrowsingStory):
NAME = 'browse:social:twitter'
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment