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

Side by Side Diff: tools/perf/page_sets/gmail_alt_two_labels.py

Issue 616363002: Kill endure benchmark and all that related to it (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Revert changes that remove --page-repeat Created 6 years, 2 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
(Empty)
1 # Copyright 2014 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file.
4 from telemetry.page import page as page_module
5 from telemetry.page import page_set as page_set_module
6
7
8 def _GetCurrentLocation(action_runner):
9 return action_runner.EvaluateJavaScript('document.location.href')
10
11
12 def _WaitForLocationChange(action_runner, old_href):
13 action_runner.WaitForJavaScriptCondition(
14 'document.location.href != "%s"' % old_href)
15
16
17 class GmailAltTwoLabelsPage(page_module.Page):
18
19 """ Why: Alternate between Inbox and Sent Mail """
20
21 def __init__(self, page_set):
22 super(GmailAltTwoLabelsPage, self).__init__(
23 url='https://mail.google.com/mail/',
24 page_set=page_set,
25 name='gmail_alt_two_labels',
26 credentials_path = 'data/credentials.json')
27 self.credentials = 'google'
28 self.user_agent_type = 'desktop'
29 self.archive_data_file = 'data/gmail_alt_two_labels.json'
30
31 def RunNavigateSteps(self, action_runner):
32 action_runner.NavigateToPage(self)
33 action_runner.WaitForJavaScriptCondition(
34 'window.gmonkey !== undefined && '
35 'document.getElementById("gb") !== null')
36
37 def RunEndure(self, action_runner):
38 old_href = _GetCurrentLocation(action_runner)
39 action_runner.ClickElement(
40 'a[href="https://mail.google.com/mail/u/0/?shva=1#sent"]')
41 _WaitForLocationChange(action_runner, old_href)
42 action_runner.Wait(1)
43 old_href = _GetCurrentLocation(action_runner)
44 action_runner.ClickElement(
45 'a[href="https://mail.google.com/mail/u/0/?shva=1#inbox"]')
46 _WaitForLocationChange(action_runner, old_href)
47 action_runner.Wait(1)
48
49
50 class GmailAltTwoLabelsPageSet(page_set_module.PageSet):
51
52 """ Chrome Endure test for GMail. """
53
54 def __init__(self):
55 super(GmailAltTwoLabelsPageSet, self).__init__(
56 user_agent_type='desktop',
57 archive_data_file='data/gmail_alt_two_labels.json',
58 bucket=page_set_module.PUBLIC_BUCKET)
59
60 self.AddPage(GmailAltTwoLabelsPage(self))
OLDNEW
« no previous file with comments | « tools/perf/page_sets/gmail_alt_threadlist_conversation.py ('k') | tools/perf/page_sets/gmail_expand_collapse_conversation.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698