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

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

Issue 625123002: Make credential_path a page attribute instead of page_set attribute. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Revert changes to path & path_unittest 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
1 # Copyright 2014 The Chromium Authors. All rights reserved. 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 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 import re 5 import re
6 6
7 from telemetry.page import page as page_module 7 from telemetry.page import page as page_module
8 from telemetry.page import page_set as page_set_module 8 from telemetry.page import page_set as page_set_module
9 9
10 10
(...skipping 17 matching lines...) Expand all
28 28
29 class GmailAltThreadlistConversationPage( 29 class GmailAltThreadlistConversationPage(
30 page_module.Page): 30 page_module.Page):
31 31
32 """ Why: Alternate between Inbox and the first email conversation. """ 32 """ Why: Alternate between Inbox and the first email conversation. """
33 33
34 def __init__(self, page_set): 34 def __init__(self, page_set):
35 super(GmailAltThreadlistConversationPage, self).__init__( 35 super(GmailAltThreadlistConversationPage, self).__init__(
36 url='https://mail.google.com/mail/', 36 url='https://mail.google.com/mail/',
37 page_set=page_set, 37 page_set=page_set,
38 name='gmail_alt_threadlist_conversation') 38 name='gmail_alt_threadlist_conversation',
39 self.credentials_path = 'data/credentials.json' 39 credentials_path = 'data/credentials.json')
40 self.user_agent_type = 'desktop' 40 self.user_agent_type = 'desktop'
41 self.archive_data_file = 'data/gmail_alt_threadlist_conversation.json' 41 self.archive_data_file = 'data/gmail_alt_threadlist_conversation.json'
42 self.credentials = 'google' 42 self.credentials = 'google'
43 43
44 def RunNavigateSteps(self, action_runner): 44 def RunNavigateSteps(self, action_runner):
45 action_runner.NavigateToPage(self) 45 action_runner.NavigateToPage(self)
46 action_runner.WaitForJavaScriptCondition( 46 action_runner.WaitForJavaScriptCondition(
47 'window.gmonkey !== undefined && ' 47 'window.gmonkey !== undefined && '
48 'document.getElementById("gb") !== null') 48 'document.getElementById("gb") !== null')
49 49
50 def RunEndure(self, action_runner): 50 def RunEndure(self, action_runner):
51 old_href = _GetCurrentLocation(action_runner) 51 old_href = _GetCurrentLocation(action_runner)
52 action_runner.ClickElement( 52 action_runner.ClickElement(
53 element_function=_CreateXpathFunction('//span[@email]')) 53 element_function=_CreateXpathFunction('//span[@email]'))
54 _WaitForLocationChange(action_runner, old_href) 54 _WaitForLocationChange(action_runner, old_href)
55 action_runner.Wait(1) 55 action_runner.Wait(1)
56 old_href = _GetCurrentLocation(action_runner) 56 old_href = _GetCurrentLocation(action_runner)
57 action_runner.ClickElement( 57 action_runner.ClickElement(
58 'a[href="https://mail.google.com/mail/u/0/?shva=1#inbox"]') 58 'a[href="https://mail.google.com/mail/u/0/?shva=1#inbox"]')
59 _WaitForLocationChange(action_runner, old_href) 59 _WaitForLocationChange(action_runner, old_href)
60 action_runner.Wait(1) 60 action_runner.Wait(1)
61 61
62 62
63 class GmailAltThreadlistConversationPageSet(page_set_module.PageSet): 63 class GmailAltThreadlistConversationPageSet(page_set_module.PageSet):
64 64
65 """ Chrome Endure test for GMail. """ 65 """ Chrome Endure test for GMail. """
66 66
67 def __init__(self): 67 def __init__(self):
68 super(GmailAltThreadlistConversationPageSet, self).__init__( 68 super(GmailAltThreadlistConversationPageSet, self).__init__(
69 credentials_path='data/credentials.json',
70 user_agent_type='desktop', 69 user_agent_type='desktop',
71 archive_data_file='data/gmail_alt_threadlist_conversation.json', 70 archive_data_file='data/gmail_alt_threadlist_conversation.json',
72 bucket=page_set_module.PUBLIC_BUCKET) 71 bucket=page_set_module.PUBLIC_BUCKET)
73 72
74 self.AddPage(GmailAltThreadlistConversationPage(self)) 73 self.AddPage(GmailAltThreadlistConversationPage(self))
OLDNEW
« no previous file with comments | « tools/perf/page_sets/calendar_forward_backward.py ('k') | tools/perf/page_sets/gmail_alt_two_labels.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698