| Index: tools/perf/page_sets/system_health/browsing_stories.py
|
| diff --git a/tools/perf/page_sets/system_health/browsing_stories.py b/tools/perf/page_sets/system_health/browsing_stories.py
|
| index 2f4efe8734cb4a31414f11f48d9141ed60a2239c..0f3976b6deb1066bcfc1d9528d32f8601536409e 100644
|
| --- a/tools/perf/page_sets/system_health/browsing_stories.py
|
| +++ b/tools/perf/page_sets/system_health/browsing_stories.py
|
| @@ -20,6 +20,8 @@ class _BrowsingStory(system_health_story.SystemHealthStory):
|
|
|
| IS_SINGLE_PAGE_APP = False
|
| ITEM_SELECTOR = NotImplemented
|
| + # Defaults to using the body element if not set.
|
| + CONTAINER_SELECTOR = None
|
| ABSTRACT_STORY = True
|
|
|
| def _WaitForNavigation(self, action_runner):
|
| @@ -31,7 +33,9 @@ class _BrowsingStory(system_health_story.SystemHealthStory):
|
| self.ITEM_SELECTOR, index)
|
| # Only scrolls if element is not currently in viewport.
|
| action_runner.WaitForElement(element_function=item_selector)
|
| - action_runner.ScrollPageToElement(element_function=item_selector)
|
| + action_runner.ScrollPageToElement(
|
| + element_function=item_selector,
|
| + container_selector=self.CONTAINER_SELECTOR)
|
| self._ClickLink(action_runner, item_selector)
|
|
|
| def _ClickLink(self, action_runner, element_function):
|
| @@ -194,6 +198,7 @@ class TwitterMobileStory(_NewsBrowsingStory):
|
| NAME = 'browse:social:twitter'
|
| URL = 'https://www.twitter.com/nasa'
|
| ITEM_SELECTOR = '.Tweet-text'
|
| + CONTAINER_SELECTOR = '.NavigationSheet'
|
| SUPPORTED_PLATFORMS = platforms.MOBILE_ONLY
|
|
|
|
|
|
|