Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(939)

Unified Diff: tools/perf/page_sets/tough_pepper_cases.py

Issue 300413002: Add simple pepper plugin telemetry test (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix formating Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tools/perf/benchmarks/scheduler.py ('k') | tools/perf/page_sets/tough_pepper_cases/extra_data/Makefile » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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))
« no previous file with comments | « tools/perf/benchmarks/scheduler.py ('k') | tools/perf/page_sets/tough_pepper_cases/extra_data/Makefile » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698