Commit 256bfab3 authored by Mythri A's avatar Mythri A Committed by Commit Bot

Add browse:social:facebook:2019 system health story

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

R=crouleau@chromium.org

Change-Id: I9e4374144f3358e6b02d25bdb8a6ea034aedd13c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1976700
Commit-Queue: Caleb Rouleau <crouleau@chromium.org>
Reviewed-by: default avatarCaleb Rouleau <crouleau@chromium.org>
Cr-Commit-Position: refs/heads/master@{#727998}
parent 9f66ee85
......@@ -51,6 +51,7 @@ _DISABLED_TESTS = frozenset({
'system_health.memory_mobile/browse:media:imgur'
'system_health.memory_mobile/browse:tech:discourse_infinite_scroll',
'system_health.memory_mobile/browse:shopping:amazon',
'system_health.memory_mobile/browse:social:facebook',
'system_health.memory_mobile/browse:social:facebook_infinite_scroll',
'system_health.memory_mobile/browse:social:pinterest_infinite_scroll',
'system_health.memory_mobile/browse:media:facebook_photos',
......
6840cad1ab0a693cc418aadd60718c195eb48445
\ No newline at end of file
180cf6cb3acbf869cb4e5ba6c071b1e6ba9f9d11
\ No newline at end of file
......@@ -150,6 +150,9 @@
"browse:social:facebook": {
"DEFAULT": "system_health_mobile_028.wprgo"
},
"browse:social:facebook:2019": {
"DEFAULT": "system_health_mobile_77b7808065.wprgo"
},
"browse:social:facebook_infinite_scroll": {
"DEFAULT": "system_health_mobile_062.wprgo"
},
......
77b7808065f53e5aa2dfe7e8a742d6f4af769c15
\ No newline at end of file
......@@ -83,8 +83,14 @@ class _ArticleBrowsingStory(_BrowsingStory):
# Some devices take long to load news webpages crbug.com/713036. Set to None
# because we cannot access DEFAULT_WEB_CONTENTS_TIMEOUT from this file.
COMPLETE_STATE_WAIT_TIMEOUT = None
# On some pages (for ex: facebook) articles appear only after we start
# scrolling. This specifies if we need scroll main page.
SCROLL_BEFORE_BROWSE = False
def _DidLoadDocument(self, action_runner):
# Scroll main page if needed before we start browsing articles.
if self.SCROLL_BEFORE_BROWSE:
self._ScrollMainPage(action_runner)
for i in xrange(self.ITEMS_TO_VISIT):
self._NavigateToItem(action_runner, i)
self._ReadNextArticle(action_runner)
......@@ -134,6 +140,34 @@ class FacebookMobileStory(_ArticleBrowsingStory):
TAGS = [story_tags.EMERGING_MARKET, story_tags.YEAR_2016]
class FacebookMobileStory2019(_ArticleBrowsingStory):
NAME = 'browse:social:facebook:2019'
URL = 'https://www.facebook.com/rihanna'
ITEM_SELECTOR = '._5msj'
MAIN_PAGE_SCROLL_REPEAT = 1
SUPPORTED_PLATFORMS = platforms.MOBILE_ONLY
IS_SINGLE_PAGE_APP = True
SCROLL_BEFORE_BROWSE = True
TAGS = [story_tags.EMERGING_MARKET, story_tags.YEAR_2019]
def _Login(self, action_runner):
facebook_login.LoginWithMobileSite(action_runner, 'facebook4')
def _ScrollMainPage(self, action_runner):
action_runner.tab.WaitForDocumentReadyStateToBeComplete()
# Facebook loads content dynamically. So keep trying to scroll till we find
# the elements. Retry 5 times waiting a bit each time.
for _ in xrange(5):
action_runner.RepeatableBrowserDrivenScroll(
repeat_count=self.MAIN_PAGE_SCROLL_REPEAT)
result = action_runner.EvaluateJavaScript(
'document.querySelectorAll("._5msj").length')
if result:
break
action_runner.Wait(1)
class FacebookDesktopStory(_ArticleBrowsingStory):
NAME = 'browse:social:facebook'
URL = 'https://www.facebook.com/rihanna'
......
......@@ -58,6 +58,7 @@ browse:shopping:flipkart,,mobile,"2016,emerging_market"
browse:shopping:lazada,,mobile,"2016,emerging_market"
browse:shopping:lazada:2019,,mobile,"2019,emerging_market"
browse:social:facebook,,mobile,"2016,emerging_market"
browse:social:facebook:2019,,mobile,"2019,emerging_market"
browse:social:facebook_infinite_scroll,,mobile,2016
browse:social:facebook_infinite_scroll:2018,,"desktop,mobile","2018,infinite_scroll"
browse:social:instagram,,mobile,"2016,emerging_market"
......
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