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

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

Issue 1198823004: Update perf page_set to use story_set (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 6 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
« no previous file with comments | « tools/perf/page_sets/garbage_collection_cases.py ('k') | tools/perf/page_sets/gmail_refresh.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 import story
8 from telemetry.page import page as page_module
7 from telemetry.page import shared_page_state 9 from telemetry.page import shared_page_state
8 from telemetry.page import page as page_module
9 from telemetry.page import page_set as page_set_module
10 10
11 11
12 def _CreateXpathFunction(xpath): 12 def _CreateXpathFunction(xpath):
13 return ('document.evaluate("%s",' 13 return ('document.evaluate("%s",'
14 'document,' 14 'document,'
15 'null,' 15 'null,'
16 'XPathResult.FIRST_ORDERED_NODE_TYPE,' 16 'XPathResult.FIRST_ORDERED_NODE_TYPE,'
17 'null)' 17 'null)'
18 '.singleNodeValue' % re.escape(xpath)) 18 '.singleNodeValue' % re.escape(xpath))
19 19
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 action_runner.WaitForElement( 52 action_runner.WaitForElement(
53 element_function=_CreateXpathFunction('//div[text()="COMPOSE"]')) 53 element_function=_CreateXpathFunction('//div[text()="COMPOSE"]'))
54 self.ComposeClick(action_runner) 54 self.ComposeClick(action_runner)
55 action_runner.Wait(1) 55 action_runner.Wait(1)
56 action_runner.WaitForElement( 56 action_runner.WaitForElement(
57 'div[class~="oh"][data-tooltip="Discard draft"]') 57 'div[class~="oh"][data-tooltip="Discard draft"]')
58 action_runner.ClickElement('div[class~="oh"][data-tooltip="Discard draft"]') 58 action_runner.ClickElement('div[class~="oh"][data-tooltip="Discard draft"]')
59 action_runner.Wait(1) 59 action_runner.Wait(1)
60 60
61 61
62 class GmailComposeDiscardPageSet(page_set_module.PageSet): 62 class GmailComposeDiscardPageSet(story.StorySet):
63 63
64 """ 64 """
65 Description: Gmail endure test: compose and discard an email. 65 Description: Gmail endure test: compose and discard an email.
66 """ 66 """
67 67
68 def __init__(self): 68 def __init__(self):
69 super(GmailComposeDiscardPageSet, self).__init__() 69 super(GmailComposeDiscardPageSet, self).__init__()
70 70
71 self.AddUserStory(GmailComposeDiscardPage(self)) 71 self.AddUserStory(GmailComposeDiscardPage(self))
OLDNEW
« no previous file with comments | « tools/perf/page_sets/garbage_collection_cases.py ('k') | tools/perf/page_sets/gmail_refresh.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698