action_runner.ScrollPage()
interaction.End()
+class ToughFastScrollingCasesPage(page_module.Page):
+
+ def __init__(self, url, name, speed_in_pixels_per_second, page_set):
+ super(ToughFastScrollingCasesPage, self).__init__(
+ url=url,
+ page_set=page_set,
+ name=name,
+ labels=['fastscrolling'])
+ self.speed_in_pixels_per_second = speed_in_pixels_per_second
+
+ def RunSmoothness(self, action_runner):
+ interaction = action_runner.BeginGestureInteraction(
+ 'ScrollAction', is_smooth=True)
+ action_runner.ScrollPage(
+ direction='down',
+ speed_in_pixels_per_second=self.speed_in_pixels_per_second)
+ interaction.End()
class ToughScrollingCasesPageSet(page_set_module.PageSet):
for url in urls_list:
self.AddPage(ToughScrollingCasesPage(url, self))
+ fast_scrolling_page_name_list = [
+ 'text',
+ 'canvas'
+ ]
+
+ fast_scrolling_speed_list = [
+ 5000, 10000, 15000, 20000, 30000, 40000, 50000, 60000, 75000, 90000
+ ]
+
+ for name in fast_scrolling_page_name_list:
+ for speed in fast_scrolling_speed_list:
+ self.AddPage(ToughFastScrollingCasesPage(
+ 'file://tough_scrolling_cases/' + name + '.html',
+ name + '_' + str(speed).zfill(5) + '_pixels_per_second',
+ speed,
+ self))