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

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

Issue 955653003: Adding Maps page to page_sets for telemetry. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@mousedrag2
Patch Set: Made changes. Created 5 years, 9 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 from telemetry.page import page as page_module 4 from telemetry.page import page as page_module
5 5
6 6
7 class TopPages(page_module.Page): 7 class TopPages(page_module.Page):
8 8
9 def __init__(self, url, page_set, name='', credentials=None): 9 def __init__(self, url, page_set, name='', credentials=None):
10 super(TopPages, self).__init__( 10 super(TopPages, self).__init__(
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 page_set=page_set, 91 page_set=page_set,
92 name='Docs (1 open document tab)', 92 name='Docs (1 open document tab)',
93 credentials='google') 93 credentials='google')
94 94
95 def RunNavigateSteps(self, action_runner): 95 def RunNavigateSteps(self, action_runner):
96 super(GoogleDocPage, self).RunNavigateSteps(action_runner) 96 super(GoogleDocPage, self).RunNavigateSteps(action_runner)
97 action_runner.Wait(2) 97 action_runner.Wait(2)
98 action_runner.WaitForJavaScriptCondition( 98 action_runner.WaitForJavaScriptCondition(
99 'document.getElementsByClassName("kix-appview-editor").length') 99 'document.getElementsByClassName("kix-appview-editor").length')
100 100
101 class GoogleMapsPage(TopPages):
102
103 """ Why: productivity, top google properties; Supports drag gesturee """
104
105 def __init__(self, page_set):
106 super(GoogleMapsPage, self).__init__(
107 url='https://www.google.co.uk/maps/@51.5043968,-0.1526806',
108 page_set=page_set,
109 name='Maps')
110
111 def RunNavigateSteps(self, action_runner):
112 super(GoogleMapsPage, self).RunNavigateSteps(action_runner)
113 action_runner.WaitForElement(selector='.widget-scene-canvas')
114 action_runner.WaitForElement(selector='.widget-zoom-in')
115 action_runner.WaitForElement(selector='.widget-zoom-out')
116
117 # Disabled on android since desktop record of maps doesn't load in android.
118 def CanRunOnBrowser(self, browser_info):
119 return (browser_info._browser._platform_backend.platform.GetOSName() !=
120 'android')
121
101 122
102 class GooglePlusPage(TopPages): 123 class GooglePlusPage(TopPages):
103 124
104 """ Why: social; top google property; Public profile; infinite scrolls """ 125 """ Why: social; top google property; Public profile; infinite scrolls """
105 126
106 def __init__(self, page_set): 127 def __init__(self, page_set):
107 super(GooglePlusPage, self).__init__( 128 super(GooglePlusPage, self).__init__(
108 url='https://plus.google.com/110031535020051778989/posts', 129 url='https://plus.google.com/110031535020051778989/posts',
109 page_set=page_set, 130 page_set=page_set,
110 credentials='google') 131 credentials='google')
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after
250 """ Why: #1 games according to Alexa (with actual games in it) """ 271 """ Why: #1 games according to Alexa (with actual games in it) """
251 272
252 def __init__(self, page_set): 273 def __init__(self, page_set):
253 super(YahooGamesPage, self).__init__( 274 super(YahooGamesPage, self).__init__(
254 url='http://games.yahoo.com', 275 url='http://games.yahoo.com',
255 page_set=page_set) 276 page_set=page_set)
256 277
257 def RunNavigateSteps(self, action_runner): 278 def RunNavigateSteps(self, action_runner):
258 super(YahooGamesPage, self).RunNavigateSteps(action_runner) 279 super(YahooGamesPage, self).RunNavigateSteps(action_runner)
259 action_runner.Wait(2) 280 action_runner.Wait(2)
OLDNEW
« no previous file with comments | « tools/perf/page_sets/top_25_smooth.py ('k') | tools/telemetry/telemetry/page/actions/action_runner.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698