| Index: LayoutTests/inspector/layers/layer-scroll-rects-update.html
|
| diff --git a/LayoutTests/inspector/layers/layer-scroll-rects-update.html b/LayoutTests/inspector/layers/layer-scroll-rects-update.html
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..7378003164e9d18e5f0680864a190a3efcf25445
|
| --- /dev/null
|
| +++ b/LayoutTests/inspector/layers/layer-scroll-rects-update.html
|
| @@ -0,0 +1,53 @@
|
| +<html>
|
| +<head>
|
| +<script src="../../http/tests/inspector/inspector-test.js"></script>
|
| +<script src="../../http/tests/inspector/layers-test.js"></script>
|
| +<script>
|
| +function test()
|
| +{
|
| + var layers = [
|
| + {layerId: "1", offsetX: 0, offsetY: 0, width: 0, height: 0, paintCount: 0},
|
| + {layerId: "2", offsetX: 0, offsetY: 0, width: 0, height: 0, paintCount: 0, parentLayerId: "1"},
|
| + {layerId: "3", offsetX: 0, offsetY: 0, width: 50, height: 50, paintCount: 0, parentLayerId: "2", nodeId: 1},
|
| + {layerId: "4", offsetX: 0, offsetY: 0, width: 50, height: 50, paintCount: 0, parentLayerId: "3", nodeId: 2}
|
| + ];
|
| + var changedLayers = [
|
| + {layerId: "1", offsetX: 0, offsetY: 0, width: 0, height: 0, paintCount: 0},
|
| + {layerId: "3", offsetX: 0, offsetY: 0, width: 50, height: 50, paintCount: 0, parentLayerId: "1", nodeId: 1},
|
| + {layerId: "4", offsetX: 0, offsetY: 0, width: 50, height: 50, paintCount: 0, parentLayerId: "3", nodeId: 2}
|
| + ];
|
| + var scrollRects = [
|
| + {layerId: "3", x: 10, y: 10, width: 10, height: 10, type: "WheelEventHandler", unchanged: true},
|
| + {layerId: "2", x: 0, y: 10, width: 10, height: 10, type: "RepaintsOnScroll", unchanged: true},
|
| + {layerId: "3", x: 10, y: 0, width: 10, height: 10, type: "TouchEventHandler", unchanged: true},
|
| + {layerId: "4", x: 0, y: 0, width: 10, height: 10, type: "TouchEventHandler", unchanged: true}
|
| + ];
|
| + var changedScrollRects = [
|
| + {layerId: "3", x: 0, y: 0, width: 10, height: 10, type: "WheelEventHandler"},
|
| + {layerId: "3", x: 10, y: 0, width: 10, height: 10, type: "TouchEventHandler"},
|
| + {layerId: "4", x: 0, y: 0, width: 10, height: 10, type: "TouchEventHandler"}
|
| + ];
|
| +
|
| + function onGotLayers()
|
| + {
|
| + InspectorTest.addResult("Initial scroll rectangles");
|
| + InspectorTest._layerTreeModel._layerTreeChanged(layers, scrollRects);
|
| + InspectorTest.dumpViewScrollRects();
|
| + InspectorTest.dumpModelScrollRects();
|
| +
|
| + InspectorTest.addResult("Updated scroll rectangles");
|
| + InspectorTest._layerTreeModel._layerTreeChanged(changedLayers, changedScrollRects);
|
| + InspectorTest.dumpViewScrollRects();
|
| + InspectorTest.dumpModelScrollRects();
|
| +
|
| + InspectorTest.completeTest();
|
| + }
|
| +
|
| + WebInspector.showPanel("layers");
|
| + InspectorTest.requestLayers(onGotLayers);
|
| +}
|
| +</script>
|
| +</head>
|
| +<body onload="runTest()">
|
| +</body>
|
| +</html>
|
|
|