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

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

Issue 1157093002: Add smoothness test for hover during trackpad scrolling [perf implications] (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Pay attention to page_scale_factor. Created 5 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 side-by-side diff with in-line comments
Download patch
Index: tools/perf/page_sets/tough_scrolling_cases.py
diff --git a/tools/perf/page_sets/tough_scrolling_cases.py b/tools/perf/page_sets/tough_scrolling_cases.py
index e76b519d59aa4ddcefa2e14f7f8f5cb120978692..5076a858e96ab7b4a816f3680cf7ad463ebc376f 100644
--- a/tools/perf/page_sets/tough_scrolling_cases.py
+++ b/tools/perf/page_sets/tough_scrolling_cases.py
@@ -1,24 +1,28 @@
# Copyright 2014 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
+from telemetry.internal.actions import page_action
from telemetry.page import page as page_module
from telemetry.page import page_set as page_set_module
class ToughFastScrollingCasesPage(page_module.Page):
- def __init__(self, url, name, speed_in_pixels_per_second, page_set):
+ def __init__(self, url, name, speed_in_pixels_per_second, page_set,
+ synthetic_gesture_source):
super(ToughFastScrollingCasesPage, self).__init__(
url=url,
page_set=page_set,
name=name)
self.speed_in_pixels_per_second = speed_in_pixels_per_second
+ self.synthetic_gesture_source = synthetic_gesture_source
def RunPageInteractions(self, action_runner):
with action_runner.CreateGestureInteraction('ScrollAction'):
action_runner.ScrollPage(
direction='down',
- speed_in_pixels_per_second=self.speed_in_pixels_per_second)
+ speed_in_pixels_per_second=self.speed_in_pixels_per_second,
+ synthetic_gesture_source=self.synthetic_gesture_source)
class ToughScrollingCasesPageSet(page_set_module.PageSet):
@@ -31,6 +35,7 @@ class ToughScrollingCasesPageSet(page_set_module.PageSet):
fast_scrolling_page_name_list = [
'text',
+ 'text_hover',
'canvas'
]
@@ -40,8 +45,12 @@ class ToughScrollingCasesPageSet(page_set_module.PageSet):
for name in fast_scrolling_page_name_list:
for speed in fast_scrolling_speed_list:
+ synthetic_gesture_source = page_action.GESTURE_SOURCE_DEFAULT
+ if "hover" in name:
+ synthetic_gesture_source = page_action.GESTURE_SOURCE_MOUSE
self.AddUserStory(ToughFastScrollingCasesPage(
'file://tough_scrolling_cases/' + name + '.html',
name + '_' + str(speed).zfill(5) + '_pixels_per_second',
speed,
- self))
+ self,
+ synthetic_gesture_source))
« no previous file with comments | « tools/perf/page_sets/key_desktop_move_cases.py ('k') | tools/perf/page_sets/tough_scrolling_cases/text_hover.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698