| Index: tools/perf/page_sets/tough_pepper_cases.py
|
| diff --git a/tools/perf/page_sets/tough_pepper_cases.py b/tools/perf/page_sets/tough_pepper_cases.py
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..0d277834fbb987450f23c24e8c7fb022a006a379
|
| --- /dev/null
|
| +++ b/tools/perf/page_sets/tough_pepper_cases.py
|
| @@ -0,0 +1,50 @@
|
| +# 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.
|
| +# pylint: disable=W0401,W0614
|
| +from telemetry.page.actions.all_page_actions import *
|
| +from telemetry.page import page as page_module
|
| +from telemetry.page import page_set as page_set_module
|
| +
|
| +class ToughPepperCasesPage(page_module.Page):
|
| +
|
| + def __init__(self, url, page_set):
|
| + super(ToughPepperCasesPage, self).__init__(url=url, page_set=page_set)
|
| +
|
| + def RunSmoothness(self, action_runner):
|
| + action_runner.RunAction(ScrollAction())
|
| +
|
| +
|
| +class Page1(ToughPepperCasesPage):
|
| +
|
| + """ Why: Simple pepper plugin for touch drawing """
|
| +
|
| + def __init__(self, page_set):
|
| + super(Page1, self).__init__(
|
| + url='file://tough_pepper_cases/simple_pepper_plugin.html',
|
| + page_set=page_set)
|
| +
|
| + def RunSmoothness(self, action_runner):
|
| + # Wait until the page and the plugin module are loaded.
|
| + action_runner.RunAction(WaitAction(
|
| + {
|
| + 'javascript': ('pageLoaded === true && moduleLoaded === true')
|
| + }))
|
| + action_runner.RunAction(ScrollAction(
|
| + {
|
| + 'scroll_requires_touch': True,
|
| + 'direction': 'up',
|
| + 'top_start_percentage': 0.3,
|
| + 'left_start_percentage': 0.3,
|
| + 'speed': 200,
|
| + 'scroll_distance_function': 'function() { return 500; }',
|
| + }))
|
| +
|
| +class ToughPepperCasesPageSet(page_set_module.PageSet):
|
| +
|
| + """ Pepper latency test cases """
|
| +
|
| + def __init__(self):
|
| + super(ToughPepperCasesPageSet, self).__init__()
|
| +
|
| + self.AddPage(Page1(self))
|
|
|