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

Unified Diff: tools/telemetry/telemetry/page/actions/scroll.js

Issue 128073002: Telemetry: Add speed parameters to swipe and scroll actions. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 11 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 | « no previous file | tools/telemetry/telemetry/page/actions/scroll.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/telemetry/telemetry/page/actions/scroll.js
diff --git a/tools/telemetry/telemetry/page/actions/scroll.js b/tools/telemetry/telemetry/page/actions/scroll.js
index 9720ebaab963ba6a3af5e4da38209a7a3b7c980a..4e78108c451aadf51f4a03d1aa8d56393b6a19d1 100644
--- a/tools/telemetry/telemetry/page/actions/scroll.js
+++ b/tools/telemetry/telemetry/page/actions/scroll.js
@@ -17,12 +17,14 @@
this.left_start_percentage_ = opt_options.left_start_percentage;
this.top_start_percentage_ = opt_options.top_start_percentage;
this.direction_ = opt_options.direction;
+ this.speed_ = opt_options.speed;
this.gesture_source_type_ = opt_options.gesture_source_type;
} else {
this.element_ = document.body;
this.left_start_percentage_ = 0.5;
this.top_start_percentage_ = 0.5;
this.direction_ = 'down';
+ this.speed_ = 800;
this.gesture_source_type_ = chrome.gpuBenchmarking.DEFAULT_INPUT;
}
}
@@ -98,7 +100,8 @@
rect.top + rect.height * this.options_.top_start_percentage_;
chrome.gpuBenchmarking.smoothScrollBy(
distance, this.onGestureComplete_.bind(this), start_left, start_top,
- this.options_.gesture_source_type, this.options_.direction_);
+ this.options_.gesture_source_type, this.options_.direction_,
+ this.options_.speed_);
};
ScrollAction.prototype.onGestureComplete_ = function() {
« no previous file with comments | « no previous file | tools/telemetry/telemetry/page/actions/scroll.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698