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

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

Issue 1092523003: WIP: Expand and de-noise touch_pinch_zoom_cases. Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 8 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 | « no previous file | tools/telemetry/telemetry/web_perf/smooth_gesture_util.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 a0067d154c78272351b81856389c105124ff296a..8da386d9c8170363b377d839a25674d56c82fdde 100644
--- a/tools/perf/page_sets/tough_pinch_zoom_cases.py
+++ b/tools/perf/page_sets/tough_pinch_zoom_cases.py
@@ -3,7 +3,7 @@
# found in the LICENSE file.
from telemetry.page import page as page_module
from telemetry.page import page_set as page_set_module
-
+import time
class ToughPinchZoomCasesPage(page_module.Page):
@@ -14,10 +14,28 @@ class ToughPinchZoomCasesPage(page_module.Page):
self.user_agent_type = 'desktop'
self.archive_data_file = 'data/tough_pinch_zoom_cases.json'
+ def RunPinchGesture(self, action_runner, left_anchor_ratio=0.5,
+ top_anchor_ratio=0.5, scale_factor=None,
+ speed_in_pixels_per_second=800):
+ #interaction = action_runner.BeginGestureInteraction(
+ # 'PinchAction')
+
+ action_runner.PinchPage(
+ left_anchor_ratio=left_anchor_ratio, top_anchor_ratio=top_anchor_ratio,
+ scale_factor=scale_factor,
+ speed_in_pixels_per_second=speed_in_pixels_per_second)
+
+ #interaction.End()
+
def RunPageInteractions(self, action_runner):
+ time.sleep(3)
interaction = action_runner.BeginGestureInteraction(
'PinchAction')
- action_runner.PinchPage()
+ for _ in range(0, 3):
+ self.RunPinchGesture(action_runner, scale_factor=7.0)
+ self.RunPinchGesture(action_runner, scale_factor=1/2.0)
+ self.RunPinchGesture(action_runner, scale_factor=1/2.0)
+ self.RunPinchGesture(action_runner, scale_factor=1/2.0)
interaction.End()
@@ -68,13 +86,6 @@ class GoogleCalendarPage(ToughPinchZoomCasesPage):
super(GoogleCalendarPage, self).RunNavigateSteps(action_runner)
action_runner.Wait(2)
- def RunPageInteractions(self, action_runner):
- interaction = action_runner.BeginGestureInteraction(
- 'PinchAction')
- action_runner.PinchPage(left_anchor_ratio=0.1, top_anchor_ratio=0.3)
- interaction.End()
-
-
class GoogleImageSearchPage(ToughPinchZoomCasesPage):
""" Why: tough image case; top google properties """
@@ -105,10 +116,11 @@ class GooglePlusPage(ToughPinchZoomCasesPage):
def RunPageInteractions(self, action_runner):
interaction = action_runner.BeginGestureInteraction(
'PinchAction')
- action_runner.PinchElement(selector='[id="110031535020051778989-tab-bar"]')
+ action_runner.PinchElement(
+ scale_factor=9, speed_in_pixels_per_second=1600,
+ selector='[id="110031535020051778989-tab-bar"]')
interaction.End()
-
class YoutubePage(ToughPinchZoomCasesPage):
""" Why: #3 (Alexa global) """
@@ -254,7 +266,7 @@ class ToughPinchZoomCasesPageSet(page_set_module.PageSet):
self.AddUserStory(GmailPage(self))
self.AddUserStory(GoogleCalendarPage(self))
self.AddUserStory(GoogleImageSearchPage(self))
- self.AddUserStory(GooglePlusPage(self))
+ #self.AddUserStory(GooglePlusPage(self))
self.AddUserStory(YoutubePage(self))
self.AddUserStory(BlogSpotPage(self))
self.AddUserStory(FacebookPage(self))
« no previous file with comments | « no previous file | tools/telemetry/telemetry/web_perf/smooth_gesture_util.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698