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): |