Index: tools/telemetry/telemetry/page/scrolling_action.js |
diff --git a/tools/telemetry/telemetry/page/scrolling_action.js b/tools/telemetry/telemetry/page/scrolling_action.js |
index 34362d6afaf586035da6e05d06ef9293744177dc..b054b6b9ff8f9cc97809edd534b0b9cde1afff43 100644 |
--- a/tools/telemetry/telemetry/page/scrolling_action.js |
+++ b/tools/telemetry/telemetry/page/scrolling_action.js |
@@ -73,9 +73,13 @@ |
chrome.gpuBenchmarking && |
chrome.gpuBenchmarking.smoothScrollBy) { |
var rect = getBoundingVisibleRect(this.element_); |
- chrome.gpuBenchmarking.smoothScrollBy(distance, function() { |
- callback(); |
- }, rect.left + rect.width / 2, rect.top + rect.height / 2); |
+ var scrolled = chrome.gpuBenchmarking.smoothScrollBy( |
+ distance, function() { |
+ callback(); |
+ }, |
+ rect.left + rect.width / 2, rect.top + rect.height / 2); |
+ if (!scrolled) |
+ console.log('Unable to start smooth scrolling'); |
return; |
} |