Mojo C++ bindings: better log message for serialization warnings.
[chromium-blink-merge.git] / tools / perf / page_sets / tough_pepper_cases.py
blobc46bbcb02be32c01e5c858ddfe3ff0201c73b7d3
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()
16 interaction.End()
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',
26 page_set=page_set)
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(
35 use_touch=True,
36 direction='up',
37 top_start_ratio=0.3,
38 left_start_ratio=0.3,
39 speed_in_pixels_per_second=200,
40 distance=500)
41 interaction.End()
43 class ToughPepperCasesPageSet(page_set_module.PageSet):
45 """ Pepper latency test cases """
47 def __init__(self):
48 super(ToughPepperCasesPageSet, self).__init__()
50 self.AddPage(Page1(self))