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 2ccfecee77acb68e13964f6cc248150cdbad8207..32952cc5d2c79993bcd68d8a145a744f76d7d3bc 100644 |
--- a/tools/telemetry/telemetry/page/actions/scroll.js |
+++ b/tools/telemetry/telemetry/page/actions/scroll.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; |
} |