Index: tools/perf/page_sets/tough_pinch_zoom_diagonal_scrolling_cases.py |
diff --git a/tools/perf/page_sets/tough_pinch_zoom_diagonal_scrolling_cases.py b/tools/perf/page_sets/tough_pinch_zoom_diagonal_scrolling_cases.py |
new file mode 100644 |
index 0000000000000000000000000000000000000000..b02f0ab4290fb00d022dfbe3f8c7b7b9dd9fce83 |
--- /dev/null |
+++ b/tools/perf/page_sets/tough_pinch_zoom_diagonal_scrolling_cases.py |
@@ -0,0 +1,61 @@ |
+# Copyright 2015 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. |
+from telemetry.page import page as page_module |
+from telemetry.page import page_set as page_set_module |
+ |
+ |
+class ToughPinchZoomDiagonalScrollingCasesPage(page_module.Page): |
jdduke (slow)
2015/02/26 20:34:12
I wonder if we want to tweak the name here. It alm
cblume
2015/02/26 21:33:07
I agree with you. I'm not a fan of this name and s
jdduke (slow)
2015/02/26 21:42:52
ToughScrollingWhileZoomedInCases or TouchZoomedInS
|
+ |
+ def __init__(self, url, page_set): |
+ super(ToughPinchZoomDiagonalScrollingCasesPage, self).__init__( |
+ url=url, |
+ page_set=page_set) |
+ |
+ def RunPageInteractions(self, action_runner): |
+ # First, zoom into the page |
+ action_runner.PinchPage( |
+ scale_factor=20.0, |
+ speed_in_pixels_per_second=10000) |
+ # 20.0 was chosen because at the time it was close to the maximum. |
+ # The more zoomed in, the more noticable the tile rasterization. |
+ # |
+ # 10,000 was chosen to complete this pre-step quickly. |
+ |
+ # Then start measurements |
+ interaction = action_runner.BeginGestureInteraction( |
+ 'ScrollAction', is_smooth=True) |
+ # And begin the diagonal scroll |
+ action_runner.ScrollPage( |
+ direction='downright', |
+ speed_in_pixels_per_second=10000) |
+ # 10,000 was chosen because it is fast enough to completely stress the |
+ # rasterization (on a Nexus 5) without saturating results. |
+ interaction.End() |
+ |
+ |
+class ToughPinchZoomDiagonalScrollingCasesPageSet(page_set_module.PageSet): |
+ """ |
+ Description: A collection of difficult scrolling tests |
+ """ |
+ |
+ def __init__(self): |
+ super(ToughPinchZoomDiagonalScrollingCasesPageSet, self).__init__( |
+ user_agent_type='desktop', |
+ archive_data_file='data/tough_pinch_zoom_cases.json', |
+ bucket=page_set_module.PARTNER_BUCKET) |
+ |
+ urls_list = [ |
+ 'file://tough_scrolling_cases/background_fixed.html', |
jdduke (slow)
2015/02/26 01:05:35
I wonder if we want all of these? Not sure, would
cblume
2015/02/26 20:22:00
We might not want all of these. I copied the list
jdduke (slow)
2015/02/26 20:34:12
I think the speed you have is fine, let's pick the
cblume
2015/02/26 21:33:07
Good idea. I'll do that.
|
+ 'file://tough_scrolling_cases/cust_scrollbar.html', |
+ 'file://tough_scrolling_cases/div_scrolls.html', |
+ 'file://tough_scrolling_cases/fixed_nonstacking.html', |
+ 'file://tough_scrolling_cases/fixed_stacking.html', |
+ 'file://tough_scrolling_cases/iframe_scrolls.html', |
+ 'file://tough_scrolling_cases/simple.html', |
+ 'file://tough_scrolling_cases/wheel_body_prevdefault.html', |
+ 'file://tough_scrolling_cases/wheel_div_prevdefault.html' |
+ ] |
+ |
+ for url in urls_list: |
+ self.AddUserStory(ToughPinchZoomDiagonalScrollingCasesPage(url, self)) |