Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(403)

Unified Diff: tools/perf/page_sets/system_health/browsing_stories.py

Issue 2414153004: [System Health] Make pinterest/tumblr stories scroll to elements off screen. (Closed)
Patch Set: Disable youtube browsing story Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tools/perf/page_sets/data/system_health_desktop_036.wpr.sha1 ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 955997ccb7d68e35c1b98c39a68fa10322bbeb99..a7dfc9cd668d6dfd9389528fce714e341348db9e 100644
--- a/tools/perf/page_sets/system_health/browsing_stories.py
+++ b/tools/perf/page_sets/system_health/browsing_stories.py
@@ -29,6 +29,8 @@ class _BrowsingStory(system_health_story.SystemHealthStory):
def _NavigateToItem(self, action_runner, index):
item_selector = 'document.querySelectorAll("%s")[%d]' % (
self.ITEM_SELECTOR, index)
+ # Only scrolls if element is not currently in viewport.
+ action_runner.ScrollPageToElement(element_function=item_selector)
self._ClickLink(action_runner, item_selector)
def _ClickLink(self, action_runner, element_function):
@@ -277,6 +279,8 @@ class YouTubeMobileStory(_MediaBrowsingStory):
ITEM_SELECTOR_INDEX = 3
+# Failing during CQ runs. crbug.com/661775
+@decorators.Disabled('linux', 'win')
class YouTubeDesktopStory(_MediaBrowsingStory):
NAME = 'browse:media:youtube'
URL = 'https://www.youtube.com/watch?v=QGfhS1hfTWw&autoplay=false'
@@ -315,23 +319,21 @@ class TumblrDesktopStory(_MediaBrowsingStory):
URL = 'https://tumblr.com/search/gifs'
ITEM_SELECTOR = '.photo'
IS_SINGLE_PAGE_APP = True
- ITEMS_TO_VISIT = 2 # Increase when crbug.com/651909 is implemented.
- ITEM_VIEW_TIME_IN_SECONDS = 5
+ ITEMS_TO_VISIT = 8
INCREMENT_INDEX_AFTER_EACH_ITEM = True
- SUPPORTED_PLATFORMS = platforms.NO_PLATFORMS # crbug.com/651909.
+ SUPPORTED_PLATFORMS = platforms.DESKTOP_ONLY
def _ViewMediaItem(self, action_runner, index):
super(TumblrDesktopStory, self)._ViewMediaItem(action_runner, index)
action_runner.MouseClick(selector='#tumblr_lightbox_center_image')
-
+ action_runner.Wait(1) # To make browsing more realistic.
class PinterestDesktopStory(_MediaBrowsingStory):
NAME = 'browse:media:pinterest'
URL = 'https://pinterest.com'
ITEM_SELECTOR = '.pinImageDim'
IS_SINGLE_PAGE_APP = True
- ITEMS_TO_VISIT = 5 # Increase when crbug.com/651909 is implemented.
- ITEM_VIEW_TIME_IN_SECONDS = 5
+ ITEMS_TO_VISIT = 8
INCREMENT_INDEX_AFTER_EACH_ITEM = True
SUPPORTED_PLATFORMS = platforms.DESKTOP_ONLY
« no previous file with comments | « tools/perf/page_sets/data/system_health_desktop_036.wpr.sha1 ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698