summaryrefslogtreecommitdiffstats
path: root/tools/perf/page_sets/tough_scrolling_cases.py
diff options
context:
space:
mode:
authorreveman <reveman@chromium.org>2014-10-31 16:47:09 -0700
committerCommit bot <commit-bot@chromium.org>2014-10-31 23:48:10 +0000
commit6311db1b5f04125b7f22dc6721e1baf3fc20265f (patch)
treeedd97561c7bee00f64d2dab7545593e8ce61aeef /tools/perf/page_sets/tough_scrolling_cases.py
parentd58c15ec73a92d4370f5d7d58dc2c6f11bce3855 (diff)
downloadchromium_src-6311db1b5f04125b7f22dc6721e1baf3fc20265f.zip
chromium_src-6311db1b5f04125b7f22dc6721e1baf3fc20265f.tar.gz
chromium_src-6311db1b5f04125b7f22dc6721e1baf3fc20265f.tar.bz2
tools: Add tough_fast_scrolling_cases page set.
This adds a page set that is useful to measure how good a browser is at producing new content when scrolling a page fast. MAX_SCROLL_LENGTH_PIXELS is changed into MAX_SCROLL_LENGTH_TIME_MS to allow fast scrolling of large pages. BUG=406404 Review URL: https://codereview.chromium.org/688423002 Cr-Commit-Position: refs/heads/master@{#302355}
Diffstat (limited to 'tools/perf/page_sets/tough_scrolling_cases.py')
-rw-r--r--tools/perf/page_sets/tough_scrolling_cases.py20
1 files changed, 20 insertions, 0 deletions
diff --git a/tools/perf/page_sets/tough_scrolling_cases.py b/tools/perf/page_sets/tough_scrolling_cases.py
index da4154a..9c76d40 100644
--- a/tools/perf/page_sets/tough_scrolling_cases.py
+++ b/tools/perf/page_sets/tough_scrolling_cases.py
@@ -16,6 +16,19 @@ class ToughScrollingCasesPage(page_module.Page):
action_runner.ScrollPage()
interaction.End()
+class ToughFastScrollingCasesPage(page_module.Page):
+
+ def __init__(self, url, page_set):
+ super(ToughFastScrollingCasesPage, self).__init__(
+ url=url,
+ page_set=page_set,
+ labels=['fastscrolling'])
+
+ def RunSmoothness(self, action_runner):
+ interaction = action_runner.BeginGestureInteraction(
+ 'ScrollAction', is_smooth=True)
+ action_runner.ScrollPage(direction='down', speed_in_pixels_per_second=16000)
+ interaction.End()
class ToughScrollingCasesPageSet(page_set_module.PageSet):
@@ -41,3 +54,10 @@ class ToughScrollingCasesPageSet(page_set_module.PageSet):
for url in urls_list:
self.AddPage(ToughScrollingCasesPage(url, self))
+ fast_scrolling_urls_list = [
+ 'file://tough_scrolling_cases/lorem_ipsum.html',
+ 'file://tough_scrolling_cases/canvas.html',
+ ]
+
+ for url in fast_scrolling_urls_list:
+ self.AddPage(ToughFastScrollingCasesPage(url, self))