| Index: tools/perf/page_sets/system_health/loading_stories.py
|
| diff --git a/tools/perf/page_sets/system_health/loading_stories.py b/tools/perf/page_sets/system_health/loading_stories.py
|
| index 71ec4ff460323d4dfb4fa7d50edafc80911305ee..deb9318991c39c82094a9ccdcae0ca7f8c6bfd81 100644
|
| --- a/tools/perf/page_sets/system_health/loading_stories.py
|
| +++ b/tools/perf/page_sets/system_health/loading_stories.py
|
| @@ -172,10 +172,17 @@ class LoadWashingtonPostMobileStory(_LoadingStory):
|
| NAME = 'load:news:washingtonpost'
|
| URL = 'https://www.washingtonpost.com/pwa'
|
| SUPPORTED_PLATFORMS = platforms.MOBILE_ONLY
|
| + _CLOSE_BUTTON_SELECTOR = '.close'
|
|
|
| def _DidLoadDocument(self, action_runner):
|
| - # Close the popup window.
|
| - action_runner.ClickElement(selector='.close')
|
| + # Close the popup window. On Nexus 9 (and probably other tables) the popup
|
| + # window does not have a "Close" button, instead it has only a "Send link
|
| + # to phone" button. So on tablets we run with the popup window open. The
|
| + # popup is transparent, so this is mostly an aesthetical issue.
|
| + has_button = action_runner.EvaluateJavaScript(
|
| + '!!document.querySelector("%s")' % self._CLOSE_BUTTON_SELECTOR)
|
| + if has_button:
|
| + action_runner.ClickElement(selector=self._CLOSE_BUTTON_SELECTOR)
|
|
|
|
|
| class LoadWikipediaStory(_LoadingStory):
|
|
|