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

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

Issue 2228103002: [system-health] Add support for disabling individual stories on individual platforms (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 3 months 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
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 e6441585609d14adc83182275256359309e8d00f..93b498a3b92dbe1bec1b09cd1750b2465202e90c 100644
--- a/tools/perf/page_sets/system_health/browsing_stories.py
+++ b/tools/perf/page_sets/system_health/browsing_stories.py
@@ -5,6 +5,8 @@
from page_sets.system_health import platforms
from page_sets.system_health import system_health_story
+from telemetry import decorators
+
class _BrowsingStory(system_health_story.SystemHealthStory):
"""Abstract base class for browsing stories.
@@ -79,15 +81,15 @@ class _NewsBrowsingStory(_BrowsingStory):
repeat_count=self.MAIN_PAGE_SCROLL_REPEAT)
+# TODO(ulan): Enable this story on mobile once it uses less memory and does not
+# crash with OOM.
+@decorators.Disabled('android')
class CnnStory(_NewsBrowsingStory):
"""The second top website in http://www.alexa.com/topsites/category/News"""
NAME = 'browse:news:cnn'
URL = 'http://edition.cnn.com/'
ITEM_SELECTOR = '.cd__content > h3 > a'
ITEMS_TO_VISIT = 2
- # TODO(ulan): Enable this story on mobile once it uses less memory and
- # does not crash with OOM.
- SUPPORTED_PLATFORMS = platforms.DESKTOP_ONLY
class FacebookMobileStory(_NewsBrowsingStory):
@@ -100,14 +102,15 @@ class FacebookMobileStory(_NewsBrowsingStory):
SUPPORTED_PLATFORMS = platforms.MOBILE_ONLY
+# Web-page-replay does not work for this website:
+# https://github.com/chromium/web-page-replay/issues/79.
+@decorators.Disabled('all')
class FacebookDesktopStory(_NewsBrowsingStory):
NAME = 'browse:social:facebook'
URL = 'https://www.facebook.com/rihanna'
ITEM_SELECTOR = '._4-eo'
IS_SINGLE_PAGE_APP = True
- # Web-page-replay does not work for this website:
- # https://github.com/chromium/web-page-replay/issues/79.
- SUPPORTED_PLATFORMS = platforms.NO_PLATFORMS
+ SUPPORTED_PLATFORMS = platforms.DESKTOP_ONLY
class FlipboardMobileStory(_NewsBrowsingStory):
@@ -151,14 +154,14 @@ class NytimesDesktopStory(_NewsBrowsingStory):
SUPPORTED_PLATFORMS = platforms.DESKTOP_ONLY
+# Desktop qq.com opens a news item in a separate tab, for which the back button
+# does not work. Mobile qq.com is disabled due to crbug.com/627166.
+@decorators.Disabled('all')
class QqMobileStory(_NewsBrowsingStory):
NAME = 'browse:news:qq'
URL = 'http://news.qq.com'
- # Desktop qq.com opens a news item in a separate tab, for which the back
- # button does not work.
- # Mobile qq.com is disabled due to crbug.com/627166
ITEM_SELECTOR = '.list .full a'
- SUPPORTED_PLATFORMS = platforms.NO_PLATFORMS
+ SUPPORTED_PLATFORMS = platforms.MOBILE_ONLY
class RedditDesktopStory(_NewsBrowsingStory):
@@ -280,7 +283,7 @@ class YouTubeDesktopStory(_MediaBrowsingStory):
ITEM_SELECTOR_INDEX = 3
-class FacebookPhotosMediaStory(_MediaBrowsingStory):
+class FacebookPhotosMobileStory(_MediaBrowsingStory):
NAME = 'browse:media:facebook_photos'
URL = (
'https://m.facebook.com/rihanna/photos/a.207477806675.138795.10092511675/10153911739606676/?type=3&source=54&ref=page_internal')
@@ -290,12 +293,12 @@ class FacebookPhotosMediaStory(_MediaBrowsingStory):
ITEM_SELECTOR_INDEX = 0
+# Recording currently does not work. The page gets stuck in the theater viewer.
+@decorators.Disabled('all')
class FacebookPhotosDesktopStory(_MediaBrowsingStory):
NAME = 'browse:media:facebook_photos'
URL = (
'https://www.facebook.com/rihanna/photos/a.207477806675.138795.10092511675/10153911739606676/?type=3&theater')
ITEM_SELECTOR = '.snowliftPager.next'
- # Recording currently does not work. The page gets stuck in the
- # theater viewer.
- SUPPORTED_PLATFORMS = platforms.NO_PLATFORMS
+ SUPPORTED_PLATFORMS = platforms.DESKTOP_ONLY
IS_SINGLE_PAGE_APP = True

Powered by Google App Engine
This is Rietveld 408576698