OLD | NEW |
(Empty) | |
| 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 # pylint: disable=W0401,W0614 |
| 5 from telemetry.page.actions.all_page_actions import * |
| 6 from telemetry.page import page as page_module |
| 7 from telemetry.page import page_set as page_set_module |
| 8 |
| 9 class ToughPepperCasesPage(page_module.Page): |
| 10 |
| 11 def __init__(self, url, page_set): |
| 12 super(ToughPepperCasesPage, self).__init__(url=url, page_set=page_set) |
| 13 |
| 14 def RunSmoothness(self, action_runner): |
| 15 action_runner.RunAction(ScrollAction()) |
| 16 |
| 17 |
| 18 class Page1(ToughPepperCasesPage): |
| 19 |
| 20 """ Why: Simple pepper plugin for touch drawing """ |
| 21 |
| 22 def __init__(self, page_set): |
| 23 super(Page1, self).__init__( |
| 24 url='file://tough_pepper_cases/simple_pepper_plugin.html', |
| 25 page_set=page_set) |
| 26 |
| 27 def RunSmoothness(self, action_runner): |
| 28 # Wait until the page and the plugin module are loaded. |
| 29 action_runner.RunAction(WaitAction( |
| 30 { |
| 31 'javascript': ('pageLoaded === true && moduleLoaded === true') |
| 32 })) |
| 33 action_runner.RunAction(ScrollAction( |
| 34 { |
| 35 'scroll_requires_touch': True, |
| 36 'direction': 'up', |
| 37 'top_start_percentage': 0.3, |
| 38 'left_start_percentage': 0.3, |
| 39 'speed': 200, |
| 40 'scroll_distance_function': 'function() { return 500; }', |
| 41 })) |
| 42 |
| 43 class ToughPepperCasesPageSet(page_set_module.PageSet): |
| 44 |
| 45 """ Pepper latency test cases """ |
| 46 |
| 47 def __init__(self): |
| 48 super(ToughPepperCasesPageSet, self).__init__() |
| 49 |
| 50 self.AddPage(Page1(self)) |
OLD | NEW |