Index: third_party/WebKit/LayoutTests/scrollingcoordinator/resources/non-fast-scrollable-region-testing.js |
diff --git a/third_party/WebKit/LayoutTests/scrollingcoordinator/resources/non-fast-scrollable-region-testing.js b/third_party/WebKit/LayoutTests/scrollingcoordinator/resources/non-fast-scrollable-region-testing.js |
index 51500d2f7478cfb76e2bcbde6e613db83b69e1c7..72a0d91278ec639b837046ec08aa9e0008c757c4 100644 |
--- a/third_party/WebKit/LayoutTests/scrollingcoordinator/resources/non-fast-scrollable-region-testing.js |
+++ b/third_party/WebKit/LayoutTests/scrollingcoordinator/resources/non-fast-scrollable-region-testing.js |
@@ -34,3 +34,11 @@ function rectToString(rect) { |
return '[' + [rect.left, rect.top, rect.width, rect.height].join(', ') + ']'; |
} |
+function sortRects(rects) { |
+ Array.prototype.sort.call(rects, (a, b) => ( |
+ a.left - b.left || |
+ a.top - b.top || |
+ a.width - b.width || |
+ a.height - b.height)); |
+ return rects; |
+} |