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

Unified Diff: tools/perf/page_sets/tough_pinch_zoom_cases.py

Issue 346923003: Add ActionRunner wrapper for the remaining less used actions (try 2): (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update unit test to skip test if touch is not supported. Created 6 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tools/perf/page_sets/top_desktop_sites_2012Q3.py ('k') | tools/perf/page_sets/tough_scheduling_cases.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/perf/page_sets/tough_pinch_zoom_cases.py
diff --git a/tools/perf/page_sets/tough_pinch_zoom_cases.py b/tools/perf/page_sets/tough_pinch_zoom_cases.py
index 6f16f8dd9de943edfb8e927516fb55b06b84b39c..0e758374ff460a96a90957b1f51f4761ca250ec4 100644
--- a/tools/perf/page_sets/tough_pinch_zoom_cases.py
+++ b/tools/perf/page_sets/tough_pinch_zoom_cases.py
@@ -17,7 +17,10 @@ class ToughPinchZoomCasesPage(page_module.Page):
self.archive_data_file = 'data/tough_pinch_zoom_cases.json'
def RunSmoothness(self, action_runner):
- action_runner.RunAction(PinchAction())
+ interaction = action_runner.BeginGestureInteraction(
+ 'PinchAction', is_smooth=True)
+ action_runner.PinchPage()
+ interaction.End()
class GoogleSearchPage(ToughPinchZoomCasesPage):
@@ -68,11 +71,10 @@ class GoogleCalendarPage(ToughPinchZoomCasesPage):
action_runner.Wait(2)
def RunSmoothness(self, action_runner):
- action_runner.RunAction(PinchAction(
- {
- 'left_anchor_percentage': 0.1,
- 'top_anchor_percentage': 0.3
- }))
+ interaction = action_runner.BeginGestureInteraction(
+ 'PinchAction', is_smooth=True)
+ action_runner.PinchPage(left_anchor_ratio=0.1, top_anchor_ratio=0.3)
+ interaction.End()
class GoogleImageSearchPage(ToughPinchZoomCasesPage):
@@ -103,13 +105,10 @@ class GooglePlusPage(ToughPinchZoomCasesPage):
action_runner.WaitForElement(text='Home')
def RunSmoothness(self, action_runner):
- action_runner.RunAction(PinchAction(
- {
- 'element_function': '''
- function(callback) {
- callback(document.getElementById("110031535020051778989-tab-bar"))
- }'''
- }))
+ interaction = action_runner.BeginGestureInteraction(
+ 'PinchAction', is_smooth=True)
+ action_runner.PinchElement(selector='110031535020051778989-tab-bar')
+ interaction.End()
class YoutubePage(ToughPinchZoomCasesPage):
@@ -237,13 +236,10 @@ class YahooAnswersPage(ToughPinchZoomCasesPage):
page_set=page_set)
def RunSmoothness(self, action_runner):
- action_runner.RunAction(PinchAction(
- {
- 'element_function': '''
- function(callback) {
- callback(document.getElementById("ya-content-apps"))
- }'''
- }))
+ interaction = action_runner.BeginGestureInteraction(
+ 'PinchAction', is_smooth=True)
+ action_runner.PinchElement(selector='ya-content-apps')
+ interaction.End()
class ToughPinchZoomCasesPageSet(page_set_module.PageSet):
« no previous file with comments | « tools/perf/page_sets/top_desktop_sites_2012Q3.py ('k') | tools/perf/page_sets/tough_scheduling_cases.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698