Chromium Code Reviews| 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 388e0ee5c3ea0c46d6988163c40715dbe8192216..520c1d09ee552e1ec46393f4c7e84e48d1923e5b 100644 |
| --- a/tools/perf/page_sets/system_health/browsing_stories.py |
| +++ b/tools/perf/page_sets/system_health/browsing_stories.py |
| @@ -182,6 +182,13 @@ class WashingtonPostMobileStory(_NewsBrowsingStory): |
| SUPPORTED_PLATFORMS = platforms.MOBILE_ONLY |
| 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. |
| + buttonSelector = '.close' |
|
petrcermak
2016/07/19 17:41:24
button_selector. Furthermore, this could be a clas
ulan
2016/07/19 17:48:55
Done.
|
| + hasButton = action_runner.EvaluateJavaScript( |
|
petrcermak
2016/07/19 17:41:24
has_button
ulan
2016/07/19 17:48:55
Done.
|
| + '!!document.querySelector("%s")' % buttonSelector) |
| + if hasButton: |
| + action_runner.ClickElement(selector=buttonSelector) |
| super(WashingtonPostMobileStory, self)._DidLoadDocument(action_runner) |