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

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

Issue 1291513004: smoothness.scrolling_tough_ad_cases to use browser driven scrolls (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 4 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
Index: tools/perf/page_sets/tough_ad_cases.py
diff --git a/tools/perf/page_sets/tough_ad_cases.py b/tools/perf/page_sets/tough_ad_cases.py
index 75ba6e53ca0f40e8eba5222a21bcf764801c299c..a203d6efcbfb4fb558130254a672beb49e609e1e 100644
--- a/tools/perf/page_sets/tough_ad_cases.py
+++ b/tools/perf/page_sets/tough_ad_cases.py
@@ -4,6 +4,7 @@
from telemetry.core import exceptions
from telemetry.page import page as page_module
+from telemetry.web_perf import timeline_interaction_record
from telemetry import story
@@ -59,13 +60,25 @@ class ScrollingPage(page_module.Page):
action_runner.WaitForJavaScriptCondition('document.body !== null')
def RunPageInteractions(self, action_runner):
- for _ in range(10):
- with action_runner.CreateGestureInteraction('ScrollAction',
- repeatable=True):
- action_runner.ScrollPage(distance=500,
- top_start_ratio=self._top_start_ratio)
- action_runner.Wait(.25)
-
+ # Set up a browser driven repeating scroll. The delay between the scrolls
+ # should be unaffected by render thread responsivness (or lack there of).
+ flags = [timeline_interaction_record.REPEATABLE]
+ scroll_command = {
+ 'method': 'Input.synthesizeScrollGesture',
+ 'params': {
+ 'x': 500,
Sami 2015/08/17 17:06:44 Can we compute these to always be the middle of sc
alex clarke (OOO till 29th) 2015/08/18 13:40:51 Done.
+ 'y': 500,
+ 'xDistance': 0,
+ 'yDistance': -300,
+ 'preventFling': True,
+ 'repeatCount': 9,
Sami 2015/08/17 17:06:44 10 assuming we change repeatCount to mean the tota
alex clarke (OOO till 29th) 2015/08/18 13:40:51 Acknowledged.
+ 'repeatDelayMs': 250,
+ 'interactionMarkerName':
+ timeline_interaction_record.GetJavaScriptMarker(
+ 'Gesture_ScrollAction', flags),
+ }
+ }
+ action_runner.tab.RunInspectorCommand(scroll_command)
class ScrollingForbesPage(ScrollingPage):

Powered by Google App Engine
This is Rietveld 408576698