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

Unified Diff: tools/perf/page_sets/top_25_smooth.py

Issue 1742363002: Only use new login flow for GmailSmoothPage (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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
« no previous file with comments | « no previous file | tools/perf/page_sets/top_pages.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/perf/page_sets/top_25_smooth.py
diff --git a/tools/perf/page_sets/top_25_smooth.py b/tools/perf/page_sets/top_25_smooth.py
index 761cd532762c93e8947e1da4df6256b435f8ecbf..fb29d30c30c7a318b91a0d272a8808c4c98a8d47 100644
--- a/tools/perf/page_sets/top_25_smooth.py
+++ b/tools/perf/page_sets/top_25_smooth.py
@@ -5,6 +5,7 @@ from telemetry.page import page as page_module
from telemetry.page import shared_page_state
from telemetry import story
+from page_sets.login_helpers import google_login
from page_sets import top_pages
@@ -34,10 +35,31 @@ class TopSmoothPage(page_module.Page):
_IssueMarkerAndScroll(action_runner)
-class GmailSmoothPage(top_pages.GmailPage):
+class GmailSmoothPage(top_pages.TopPages):
""" Why: productivity, top google properties """
+ def __init__(self, page_set,
+ shared_page_state_class=shared_page_state.SharedPageState):
+ # TODO(flackr): This is duplicating page logic from top_pages.py but is
+ # the only way to update https://mail.google.com/mail/ for this test without
+ # updating the 14 other recordings, as the gmail login flow has changed.
+ # https://crbug.com/590766 tracks updating google_login.py to support
+ # legacy and new login flow.
+ super(GmailSmoothPage, self).__init__(
+ url='https://mail.google.com/mail/',
+ page_set=page_set,
+ shared_page_state_class=shared_page_state_class)
+
+ def RunNavigateSteps(self, action_runner):
+ google_login.LoginGoogleAccount(action_runner, 'google3',
+ self.credentials_path)
+ super(GmailSmoothPage, self).RunNavigateSteps(action_runner)
+ action_runner.WaitForJavaScriptCondition(
+ 'window.gmonkey !== undefined &&'
+ 'document.getElementById("gb") !== null',
+ timeout_in_seconds=120)
+
def RunPageInteractions(self, action_runner):
action_runner.ExecuteJavaScript('''
gmonkey.load('2.0', function(api) {
« no previous file with comments | « no previous file | tools/perf/page_sets/top_pages.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698