Chromium Code Reviews| 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) |