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

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

Issue 654263005: Add android acceptance test to telemetry. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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
« no previous file with comments | « tools/perf/benchmarks/power.py ('k') | tools/perf/page_sets/data/android_acceptance.json » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 class AndroidAcceptancePage(page_module.Page):
9
10 def __init__(self, url, page_set, name=''):
11 super(AndroidAcceptancePage, self).__init__(
12 url=url, page_set=page_set, name=name,
13 credentials_path = 'data/credentials.json')
14 self.user_agent_type = 'desktop'
15 self.archive_data_file = 'data/android_acceptance.json'
16
17 def RunPageInteractions(self, action_runner):
18 interaction = action_runner.BeginGestureInteraction(
19 'ScrollAction', is_smooth=True)
tonyg 2014/10/15 23:26:49 I believe is_smooth turns on chrome tracing. We'll
rnephew (Reviews Here) 2014/10/16 17:02:24 Done.
20 action_runner.Wait(20)
21 action_runner.ScrollPage()
tonyg 2014/10/15 23:26:49 I don't believe they do the scroll, right? Adding
sullivan 2014/10/16 14:47:30 Also, is it possible to structure this so we can u
rnephew (Reviews Here) 2014/10/16 17:02:24 Done. How do I get the websites to load to the SD
22 action_runner.Wait(20)
23 interaction.End()
24
25
26 class AmazonPage(AndroidAcceptancePage):
27
28 """ Why: Part of androids power acceptance test """
29
30 def __init__(self, page_set):
31 super(AmazonPage, self).__init__(
32 url='https://www.amazon.com',
33 page_set=page_set)
34
35 def RunNavigateSteps(self, action_runner):
36 action_runner.NavigateToPage(self)
37 action_runner.WaitForElement(text='Conditions of Use')
tonyg 2014/10/15 23:26:49 Why are we waiting for an element? AFAICT, we shou
rnephew (Reviews Here) 2014/10/16 17:02:24 Done.
38
39
40 class CnnPage(AndroidAcceptancePage):
41
42 """ Why: Part of androids power acceptance test """
43
44 def __init__(self, page_set):
45 super(CnnPage, self).__init__(
46 url='http://www.cnn.com/',
47 page_set=page_set)
48
49 def RunNavigateSteps(self, action_runner):
50 action_runner.NavigateToPage(self)
51 action_runner.WaitForElement(text='Contact us')
52
53
54 class MsnPage(AndroidAcceptancePage):
55
56 """ Why: Part of androids power acceptance test """
57
58 def __init__(self, page_set):
59 super(MsnPage, self).__init__(
60 url='http://www.msn.com',
61 page_set=page_set)
62
63 def RunNavigateSteps(self, action_runner):
64 action_runner.NavigateToPage(self)
65 action_runner.WaitForElement(text='Privacy')
66
67
68 class AndroidAcceptancePageSet(page_set_module.PageSet):
69
70 """ Pages used in android acceptance testing. """
71
72 def __init__(self):
73 super(AndroidAcceptancePageSet, self).__init__(
74 user_agent_type='desktop',
sullivan 2014/10/16 14:47:30 Why desktop? Does the "real" acceptance test use a
rnephew (Reviews Here) 2014/10/16 17:02:24 Added comment explaining why it uses desktop user
75 archive_data_file='data/android_acceptance.json',
76 bucket=page_set_module.PARTNER_BUCKET)
77
78 self.AddPage(AmazonPage(self))
tonyg 2014/10/15 23:26:49 Is it possible to write a loop that does something
rnephew (Reviews Here) 2014/10/16 17:02:24 Done.
79 self.AddPage(CnnPage(self))
80 self.AddPage(MsnPage(self))
OLDNEW
« no previous file with comments | « tools/perf/benchmarks/power.py ('k') | tools/perf/page_sets/data/android_acceptance.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698