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

Side by Side Diff: tools/perf/page_sets/system_health/long_running_stories.py

Issue 2719853003: [Telemetry refactor] Drop "2" from method calls to JS API (Closed)
Patch Set: Created 3 years, 9 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 unified diff | Download patch
OLDNEW
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.login_helpers import google_login 5 from page_sets.login_helpers import google_login
6 from page_sets.system_health import platforms 6 from page_sets.system_health import platforms
7 from page_sets.system_health import system_health_story 7 from page_sets.system_health import system_health_story
8 8
9 from telemetry import decorators 9 from telemetry import decorators
10 10
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 class _LongRunningGmailMobileBase(_LongRunningGmailBase): 58 class _LongRunningGmailMobileBase(_LongRunningGmailBase):
59 SUPPORTED_PLATFORMS = platforms.MOBILE_ONLY 59 SUPPORTED_PLATFORMS = platforms.MOBILE_ONLY
60 60
61 @classmethod 61 @classmethod
62 def ShouldDisable(cls, possible_browser): 62 def ShouldDisable(cls, possible_browser):
63 # crbug.com/651198 63 # crbug.com/651198
64 return possible_browser.platform.IsSvelte() 64 return possible_browser.platform.IsSvelte()
65 65
66 def _DidLoadDocument(self, action_runner): 66 def _DidLoadDocument(self, action_runner):
67 # Close the "Get Inbox by Gmail" interstitial. 67 # Close the "Get Inbox by Gmail" interstitial.
68 action_runner.WaitForJavaScriptCondition2( 68 action_runner.WaitForJavaScriptCondition(
69 'document.querySelector("#isppromo a") !== null') 69 'document.querySelector("#isppromo a") !== null')
70 action_runner.ExecuteJavaScript2( 70 action_runner.ExecuteJavaScript(
71 'document.querySelector("#isppromo a").click()') 71 'document.querySelector("#isppromo a").click()')
72 # Wait until the UI loads. 72 # Wait until the UI loads.
73 action_runner.WaitForJavaScriptCondition2( 73 action_runner.WaitForJavaScriptCondition(
74 'document.getElementById("apploadingdiv").style.height === "0px"') 74 'document.getElementById("apploadingdiv").style.height === "0px"')
75 75
76 76
77 class _LongRunningGmailDesktopBase(_LongRunningGmailBase): 77 class _LongRunningGmailDesktopBase(_LongRunningGmailBase):
78 SUPPORTED_PLATFORMS = platforms.DESKTOP_ONLY 78 SUPPORTED_PLATFORMS = platforms.DESKTOP_ONLY
79 79
80 def _DidLoadDocument(self, action_runner): 80 def _DidLoadDocument(self, action_runner):
81 # Wait until the UI loads. 81 # Wait until the UI loads.
82 action_runner.WaitForJavaScriptCondition2( 82 action_runner.WaitForJavaScriptCondition(
83 'document.getElementById("loading").style.display === "none"') 83 'document.getElementById("loading").style.display === "none"')
84 84
85 85
86 @decorators.Disabled('android') # crbug.com/657433 86 @decorators.Disabled('android') # crbug.com/657433
87 class LongRunningGmailMobileForegroundStory(_LongRunningGmailMobileBase): 87 class LongRunningGmailMobileForegroundStory(_LongRunningGmailMobileBase):
88 NAME = 'long_running:tools:gmail-foreground' 88 NAME = 'long_running:tools:gmail-foreground'
89 89
90 90
91 @decorators.Disabled('all') # crbug.com/681839 91 @decorators.Disabled('all') # crbug.com/681839
92 class LongRunningGmailDesktopForegroundStory(_LongRunningGmailDesktopBase): 92 class LongRunningGmailDesktopForegroundStory(_LongRunningGmailDesktopBase):
93 NAME = 'long_running:tools:gmail-foreground' 93 NAME = 'long_running:tools:gmail-foreground'
94 94
95 95
96 @decorators.Disabled('android-webview', # Weview does not have tabs. 96 @decorators.Disabled('android-webview', # Weview does not have tabs.
97 'android') # crbug.com/657433 97 'android') # crbug.com/657433
98 class LongRunningGmailMobileBackgroundStory(_LongRunningGmailMobileBase): 98 class LongRunningGmailMobileBackgroundStory(_LongRunningGmailMobileBase):
99 BACKGROUND = True 99 BACKGROUND = True
100 NAME = 'long_running:tools:gmail-background' 100 NAME = 'long_running:tools:gmail-background'
101 101
102 102
103 class LongRunningGmailDesktopBackgroundStory(_LongRunningGmailDesktopBase): 103 class LongRunningGmailDesktopBackgroundStory(_LongRunningGmailDesktopBase):
104 BACKGROUND = True 104 BACKGROUND = True
105 NAME = 'long_running:tools:gmail-background' 105 NAME = 'long_running:tools:gmail-background'
OLDNEW
« no previous file with comments | « tools/perf/page_sets/system_health/loading_stories.py ('k') | tools/perf/page_sets/system_health/media_stories.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698