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

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

Issue 323833003: Create ActionRunner wrapper API over TapAction and ClickElementAction. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebasing to head. Created 6 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/top_25.py ('k') | tools/telemetry/telemetry/page/actions/action_runner.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 # 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 WebrtcCasesPage(page_module.Page): 10 class WebrtcCasesPage(page_module.Page):
(...skipping 20 matching lines...) Expand all
31 class Page2(WebrtcCasesPage): 31 class Page2(WebrtcCasesPage):
32 32
33 """ Why: Loopback video call using the PeerConnection API. """ 33 """ Why: Loopback video call using the PeerConnection API. """
34 34
35 def __init__(self, page_set): 35 def __init__(self, page_set):
36 super(Page2, self).__init__( 36 super(Page2, self).__init__(
37 url='file://third_party/webrtc/samples/js/demos/html/pc1.html', 37 url='file://third_party/webrtc/samples/js/demos/html/pc1.html',
38 page_set=page_set) 38 page_set=page_set)
39 39
40 def RunEndure(self, action_runner): 40 def RunEndure(self, action_runner):
41 action_runner.RunAction(ClickElementAction( 41 action_runner.ClickElement('button[id="btn1"]')
42 {
43 'selector': 'button[id="btn1"]'
44 }))
45 action_runner.Wait(2) 42 action_runner.Wait(2)
46 action_runner.RunAction(ClickElementAction( 43 action_runner.ClickElement('button[id="btn2"]')
47 {
48 'selector': 'button[id="btn2"]'
49 }))
50 action_runner.Wait(10) 44 action_runner.Wait(10)
51 action_runner.RunAction(ClickElementAction( 45 action_runner.ClickElement('button[id="btn3"]')
52 {
53 'selector': 'button[id="btn3"]'
54 }))
55 46
56 def RunWebrtc(self, action_runner): 47 def RunWebrtc(self, action_runner):
57 action_runner.RunAction(ClickElementAction( 48 action_runner.ClickElement('button[id="btn1"]')
58 {
59 'selector': 'button[id="btn1"]'
60 }))
61 action_runner.Wait(2) 49 action_runner.Wait(2)
62 action_runner.RunAction(ClickElementAction( 50 action_runner.ClickElement('button[id="btn2"]')
63 {
64 'selector': 'button[id="btn2"]'
65 }))
66 action_runner.Wait(10) 51 action_runner.Wait(10)
67 action_runner.RunAction(ClickElementAction( 52 action_runner.ClickElement('button[id="btn3"]')
68 {
69 'selector': 'button[id="btn3"]'
70 }))
71 53
72 54
73 class WebrtcCasesPageSet(page_set_module.PageSet): 55 class WebrtcCasesPageSet(page_set_module.PageSet):
74 56
75 """ WebRTC tests for Real-time audio and video communication. """ 57 """ WebRTC tests for Real-time audio and video communication. """
76 58
77 def __init__(self): 59 def __init__(self):
78 super(WebrtcCasesPageSet, self).__init__( 60 super(WebrtcCasesPageSet, self).__init__(
79 serving_dirs=['third_party/webrtc/samples/js']) 61 serving_dirs=['third_party/webrtc/samples/js'])
80 62
81 self.AddPage(Page1(self)) 63 self.AddPage(Page1(self))
82 self.AddPage(Page2(self)) 64 self.AddPage(Page2(self))
OLDNEW
« no previous file with comments | « tools/perf/page_sets/top_25.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