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

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

Issue 277143003: Add NavigateToPage API for action_runner. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 6 years, 7 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 # pylint: disable=W0401,W0614 4 # pylint: disable=W0401,W0614
5 from telemetry.page.actions.all_page_actions import * 5 from telemetry.page.actions.all_page_actions import *
6 from telemetry.page import page as page_module 6 from telemetry.page import page as page_module
7 from telemetry.page import page_set as page_set_module 7 from telemetry.page import page_set as page_set_module
8 8
9 9
10 class ToughEnergyCasesPage(page_module.Page): 10 class ToughEnergyCasesPage(page_module.Page):
11 11
12 def __init__(self, url, page_set): 12 def __init__(self, url, page_set):
13 super(ToughEnergyCasesPage, self).__init__(url=url, page_set=page_set) 13 super(ToughEnergyCasesPage, self).__init__(url=url, page_set=page_set)
14 self.credentials_path = 'data/credentials.json' 14 self.credentials_path = 'data/credentials.json'
15 self.archive_data_file = 'data/tough_energy_cases.json' 15 self.archive_data_file = 'data/tough_energy_cases.json'
16 16
17 17
18 class GmailPage(ToughEnergyCasesPage): 18 class GmailPage(ToughEnergyCasesPage):
19 19
20 """ Why: productivity, top google properties """ 20 """ Why: productivity, top google properties """
21 21
22 def __init__(self, page_set): 22 def __init__(self, page_set):
23 super(GmailPage, self).__init__( 23 super(GmailPage, self).__init__(
24 url='https://mail.google.com/mail/', 24 url='https://mail.google.com/mail/',
25 page_set=page_set) 25 page_set=page_set)
26 26
27 self.credentials = 'google' 27 self.credentials = 'google'
28 28
29 def RunNavigateSteps(self, action_runner): 29 def RunNavigateSteps(self, action_runner):
30 action_runner.RunAction(NavigateAction()) 30 action_runner.NavigateToPage(self)
31 action_runner.RunAction(WaitAction( 31 action_runner.RunAction(WaitAction(
32 { 32 {
33 'javascript': ( 33 'javascript': (
34 'window.gmonkey !== undefined &&' 34 'window.gmonkey !== undefined &&'
35 'document.getElementById("gb") !== null') 35 'document.getElementById("gb") !== null')
36 })) 36 }))
37 37
38 38
39 class ToughEnergyCasesPageSet(page_set_module.PageSet): 39 class ToughEnergyCasesPageSet(page_set_module.PageSet):
40 40
(...skipping 10 matching lines...) Expand all
51 self)) 51 self))
52 self.AddPage(GmailPage(self)) 52 self.AddPage(GmailPage(self))
53 # Why: Below the fold animated gif 53 # Why: Below the fold animated gif
54 self.AddPage(ToughEnergyCasesPage( 54 self.AddPage(ToughEnergyCasesPage(
55 'file://tough_energy_cases/below-fold-animated-gif.html', 55 'file://tough_energy_cases/below-fold-animated-gif.html',
56 self)) 56 self))
57 # Why: Below the fold flash animation 57 # Why: Below the fold flash animation
58 self.AddPage(ToughEnergyCasesPage( 58 self.AddPage(ToughEnergyCasesPage(
59 'file://tough_energy_cases/below-fold-flash.html', 59 'file://tough_energy_cases/below-fold-flash.html',
60 self)) 60 self))
OLDNEW
« no previous file with comments | « tools/perf/page_sets/tough_compositor_cases.py ('k') | tools/perf/page_sets/tough_pinch_zoom_cases.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698