| OLD | NEW |
| 1 # Copyright 2016 The Chromium Authors. All rights reserved. | 1 # Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
| 3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
| 4 | 4 |
| 5 from page_sets.system_health import platforms | 5 from page_sets.system_health import platforms |
| 6 from page_sets.system_health import system_health_story | 6 from page_sets.system_health import system_health_story |
| 7 from page_sets.system_health.loading_stories import LoadGmailMobileStory | 7 from page_sets.system_health.loading_stories import LoadGmailMobileStory |
| 8 | 8 |
| 9 from telemetry import decorators |
| 10 |
| 9 _WAIT_FOR_VIDEO_SECONDS = 5 | 11 _WAIT_FOR_VIDEO_SECONDS = 5 |
| 10 | 12 |
| 11 class _BackgroundStory(system_health_story.SystemHealthStory): | 13 class _BackgroundStory(system_health_story.SystemHealthStory): |
| 12 """Abstract base class for background stories | 14 """Abstract base class for background stories |
| 13 | 15 |
| 14 As in _LoadingStory except it puts the browser into the | 16 As in _LoadingStory except it puts the browser into the |
| 15 background before measuring. | 17 background before measuring. |
| 16 """ | 18 """ |
| 17 ABSTRACT_STORY = True | 19 ABSTRACT_STORY = True |
| 18 SUPPORTED_PLATFORMS = platforms.MOBILE_ONLY | 20 SUPPORTED_PLATFORMS = platforms.MOBILE_ONLY |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 69 action_runner.TapElement(selector='.nytd-player-poster') | 71 action_runner.TapElement(selector='.nytd-player-poster') |
| 70 action_runner.Wait(_WAIT_FOR_VIDEO_SECONDS) | 72 action_runner.Wait(_WAIT_FOR_VIDEO_SECONDS) |
| 71 | 73 |
| 72 | 74 |
| 73 class BackgroundImgurMobileStory(_BackgroundStory): | 75 class BackgroundImgurMobileStory(_BackgroundStory): |
| 74 NAME = 'background:media:imgur' | 76 NAME = 'background:media:imgur' |
| 75 URL = 'http://imgur.com/gallery/hUita' | 77 URL = 'http://imgur.com/gallery/hUita' |
| 76 SUPPORTED_PLATFORMS = platforms.MOBILE_ONLY | 78 SUPPORTED_PLATFORMS = platforms.MOBILE_ONLY |
| 77 | 79 |
| 78 | 80 |
| 81 @decorators.Disabled('android') # crbug.com.com/664505 |
| 79 class BackgroundGmailMobileStory(LoadGmailMobileStory): | 82 class BackgroundGmailMobileStory(LoadGmailMobileStory): |
| 80 NAME = 'background:tools:gmail' | 83 NAME = 'background:tools:gmail' |
| 81 SUPPORTED_PLATFORMS = platforms.MOBILE_ONLY | 84 SUPPORTED_PLATFORMS = platforms.MOBILE_ONLY |
| 82 | 85 |
| 83 def _Measure(self, action_runner): | 86 def _Measure(self, action_runner): |
| 84 action_runner.tab.browser.Background() | 87 action_runner.tab.browser.Background() |
| 85 super(BackgroundGmailMobileStory, self)._Measure(action_runner) | 88 super(BackgroundGmailMobileStory, self)._Measure(action_runner) |
| OLD | NEW |