1 # Copyright 2014 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file.
4 from telemetry
.page
import page
as page_module
5 from telemetry
.page
import page_set
as page_set_module
7 class ToughPepperCasesPage(page_module
.Page
):
9 def __init__(self
, url
, page_set
):
10 super(ToughPepperCasesPage
, self
).__init
__(url
=url
, page_set
=page_set
)
12 def RunSmoothness(self
, action_runner
):
13 interaction
= action_runner
.BeginGestureInteraction(
14 'ScrollAction', is_smooth
=True)
15 action_runner
.ScrollPage()
19 class Page1(ToughPepperCasesPage
):
21 """ Why: Simple pepper plugin for touch drawing """
23 def __init__(self
, page_set
):
24 super(Page1
, self
).__init
__(
25 url
='file://tough_pepper_cases/simple_pepper_plugin.html',
28 def RunSmoothness(self
, action_runner
):
29 # Wait until the page and the plugin module are loaded.
30 action_runner
.WaitForJavaScriptCondition(
31 'pageLoaded === true && moduleLoaded === true')
32 interaction
= action_runner
.BeginGestureInteraction(
33 'ScrollAction', is_smooth
=True)
34 action_runner
.ScrollPage(
39 speed_in_pixels_per_second
=200,
43 class ToughPepperCasesPageSet(page_set_module
.PageSet
):
45 """ Pepper latency test cases """
48 super(ToughPepperCasesPageSet
, self
).__init
__()
50 self
.AddPage(Page1(self
))