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

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

Issue 2505803002: Re-enable background:news:nytimes to examine crash (Closed)
Patch Set: fix story for n7 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 | « no previous file | 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/background_stories.py
diff --git a/tools/perf/page_sets/system_health/background_stories.py b/tools/perf/page_sets/system_health/background_stories.py
index ff16a87737efe91c938a10813ea5fad2b940deff..a30cbf0465ab4d15c78604514f7def7f32841ba6 100644
--- a/tools/perf/page_sets/system_health/background_stories.py
+++ b/tools/perf/page_sets/system_health/background_stories.py
@@ -6,9 +6,6 @@ from page_sets.system_health import platforms
from page_sets.system_health import system_health_story
from page_sets.system_health.loading_stories import LoadGmailMobileStory
-from telemetry import decorators
-
-
_WAIT_FOR_VIDEO_SECONDS = 5
class _BackgroundStory(system_health_story.SystemHealthStory):
@@ -42,7 +39,6 @@ class BackgroundFacebookMobileStory(_BackgroundStory):
SUPPORTED_PLATFORMS = platforms.MOBILE_ONLY
-@decorators.Disabled('android') # crbug.com/664521
class BackgroundNytimesMobileStory(_BackgroundStory):
"""The third top website in http://www.alexa.com/topsites/category/News"""
NAME = 'background:news:nytimes'
@@ -64,6 +60,12 @@ class BackgroundNytimesMobileStory(_BackgroundStory):
# Scroll to video, start it and then wait for a few seconds.
action_runner.WaitForElement(selector='.nytd-player-poster')
action_runner.ScrollPageToElement(selector='.nytd-player-poster')
+ # For some reason on some devices (e.g. Nexus7) we don't scroll all the way
+ # to the element. I think this might be caused by the page reflowing (due to
+ # vidoes loading) during the scroll. To be sure we get to the element
+ # wait a moment and then try to scroll again.
+ action_runner.Wait(1)
+ action_runner.ScrollPageToElement(selector='.nytd-player-poster')
perezju 2016/11/25 14:05:40 I'm OK with this as a short-term fix, but sounds l
action_runner.TapElement(selector='.nytd-player-poster')
action_runner.Wait(_WAIT_FOR_VIDEO_SECONDS)
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698