Index: LayoutTests/http/tests/inspector/layers-test.js |
diff --git a/LayoutTests/http/tests/inspector/layers-test.js b/LayoutTests/http/tests/inspector/layers-test.js |
index 6e019d7e1d9a2884200045236e0632c85e40c475..d4f883dc3bb2b4b38e24adb278209aa77b37feea 100644 |
--- a/LayoutTests/http/tests/inspector/layers-test.js |
+++ b/LayoutTests/http/tests/inspector/layers-test.js |
@@ -101,4 +101,37 @@ function initialize_LayerTreeTests() |
callback(); |
} |
} |
+ |
+ InspectorTest.dumpViewScrollRect = function(element) |
+ { |
+ var value = { |
+ className: element.className, |
+ title: element.title, |
+ width: element.style.width, |
+ height: element.style.height, |
+ left: element.style.left, |
+ top: element.style.top |
+ }; |
+ if (element.__unchanged) |
+ value.__unchanged = element.__unchanged; |
+ InspectorTest.addObject(value, null, "", "scroll-rect: "); |
+ } |
+ |
+ InspectorTest.dumpViewScrollRects = function() |
+ { |
+ InspectorTest.addResult("View elements dump"); |
+ var root = WebInspector.panel("layers")._layers3DView._rotatingContainerElement; |
+ Array.prototype.forEach.call(root.querySelectorAll('.scroll-rect'), InspectorTest.dumpViewScrollRect.bind(InspectorTest)); |
+ } |
+ |
+ InspectorTest.dumpModelScrollRects = function() |
+ { |
+ function dumpScrollRectsForLayer(layer) |
+ { |
+ InspectorTest.addObject(layer._scrollRects); |
+ } |
+ |
+ InspectorTest.addResult("Model elements dump"); |
+ InspectorTest._layerTreeModel.forEachLayer(dumpScrollRectsForLayer.bind(this)); |
+ } |
} |