| OLD | NEW |
| 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 from telemetry.page import page as page_module | 4 from telemetry.page import page as page_module |
| 5 from telemetry.page import page_set as page_set_module | 5 from telemetry.page import page_set as page_set_module |
| 6 | 6 |
| 7 | 7 |
| 8 class GmailExpandCollapseConversationPage( | 8 class GmailExpandCollapseConversationPage( |
| 9 page_module.Page): | 9 page_module.Page): |
| 10 | 10 |
| 11 """ Why: Expand and Collapse a long conversation. """ | 11 """ Why: Expand and Collapse a long conversation. """ |
| 12 # TODO(edmundyan): Find a long conversation rather than hardcode url | 12 # TODO(edmundyan): Find a long conversation rather than hardcode url |
| 13 | 13 |
| 14 def __init__(self, page_set): | 14 def __init__(self, page_set): |
| 15 super(GmailExpandCollapseConversationPage, self).__init__( | 15 super(GmailExpandCollapseConversationPage, self).__init__( |
| 16 url='https://mail.google.com/mail/u/0/#inbox/13c6a141fa95ffe0', | 16 url='https://mail.google.com/mail/u/0/#inbox/13c6a141fa95ffe0', |
| 17 page_set=page_set, | 17 page_set=page_set, |
| 18 name='gmail_expand_collapse_conversation') | 18 name='gmail_expand_collapse_conversation', |
| 19 self.credentials_path = 'data/credentials.json' | 19 credentials_path='data/credentials.json') |
| 20 self.credentials = 'google' | 20 self.credentials = 'google' |
| 21 self.user_agent_type = 'desktop' | 21 self.user_agent_type = 'desktop' |
| 22 self.archive_data_file = 'data/gmail_expand_collapse_conversation.json' | 22 self.archive_data_file = 'data/gmail_expand_collapse_conversation.json' |
| 23 | 23 |
| 24 def RunNavigateSteps(self, action_runner): | 24 def RunNavigateSteps(self, action_runner): |
| 25 action_runner.NavigateToPage(self) | 25 action_runner.NavigateToPage(self) |
| 26 action_runner.WaitForElement('img[alt="Expand all"]') | 26 action_runner.WaitForElement('img[alt="Expand all"]') |
| 27 action_runner.ClickElement('img[alt="Expand all"]') | 27 action_runner.ClickElement('img[alt="Expand all"]') |
| 28 action_runner.Wait(5) | 28 action_runner.Wait(5) |
| 29 action_runner.WaitForElement('img[alt="Collapse all"]') | 29 action_runner.WaitForElement('img[alt="Collapse all"]') |
| (...skipping 10 matching lines...) Expand all Loading... |
| 40 | 40 |
| 41 | 41 |
| 42 class GmailExpandCollapseConversationPageSet(page_set_module.PageSet): | 42 class GmailExpandCollapseConversationPageSet(page_set_module.PageSet): |
| 43 | 43 |
| 44 """ | 44 """ |
| 45 Description: Chrome Endure test for GMail. | 45 Description: Chrome Endure test for GMail. |
| 46 """ | 46 """ |
| 47 | 47 |
| 48 def __init__(self): | 48 def __init__(self): |
| 49 super(GmailExpandCollapseConversationPageSet, self).__init__( | 49 super(GmailExpandCollapseConversationPageSet, self).__init__( |
| 50 credentials_path='data/credentials.json', | |
| 51 user_agent_type='desktop', | 50 user_agent_type='desktop', |
| 52 archive_data_file='data/gmail_expand_collapse_conversation.json', | 51 archive_data_file='data/gmail_expand_collapse_conversation.json', |
| 53 bucket=page_set_module.PUBLIC_BUCKET) | 52 bucket=page_set_module.PUBLIC_BUCKET) |
| 54 | 53 |
| 55 self.AddPage(GmailExpandCollapseConversationPage(self)) | 54 self.AddPage(GmailExpandCollapseConversationPage(self)) |
| OLD | NEW |