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

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

Issue 2159253002: [system health] Fix load:news:washingtonpost and browse:news:washingtonpost on Nexus9. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rename variable Created 4 years, 5 months 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
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..788971bc1a6d0bc80d92243bdd3697edf0bd038c 100644
--- a/tools/perf/page_sets/system_health/loading_stories.py
+++ b/tools/perf/page_sets/system_health/loading_stories.py
@@ -174,8 +174,15 @@ class LoadWashingtonPostMobileStory(_LoadingStory):
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 Same comments as above.
ulan 2016/07/19 17:48:55 Done.
+ hasButton = action_runner.EvaluateJavaScript(
+ '!!document.querySelector("%s")' % buttonSelector)
+ if hasButton:
+ action_runner.ClickElement(selector=buttonSelector)
class LoadWikipediaStory(_LoadingStory):

Powered by Google App Engine
This is Rietveld 408576698