OLD | NEW |
(Empty) | |
| 1 <html> |
| 2 <head> |
| 3 <script src="../http/tests/inspector/inspector-test.js"></script> |
| 4 <script src="../http/tests/inspector/layers-test.js"></script> |
| 5 <script> |
| 6 function test() |
| 7 { |
| 8 var layers = [ |
| 9 {layerId: "1", offsetX: 0, offsetY: 0, width: 0, height: 0, paintCount:
0}, |
| 10 {layerId: "2", offsetX: 0, offsetY: 0, width: 0, height: 0, paintCount:
0, parentLayerId: "1"}, |
| 11 {layerId: "3", offsetX: 0, offsetY: 0, width: 50, height: 50, paintCount
: 0, parentLayerId: "2", nodeId: 1}, |
| 12 {layerId: "4", offsetX: 0, offsetY: 0, width: 50, height: 50, paintCount
: 0, parentLayerId: "3", nodeId: 2} |
| 13 ]; |
| 14 var changedLayers = [ |
| 15 {layerId: "1", offsetX: 0, offsetY: 0, width: 0, height: 0, paintCount:
0}, |
| 16 {layerId: "3", offsetX: 0, offsetY: 0, width: 50, height: 50, paintCount
: 0, parentLayerId: "1", nodeId: 1}, |
| 17 {layerId: "4", offsetX: 0, offsetY: 0, width: 50, height: 50, paintCount
: 0, parentLayerId: "3", nodeId: 2} |
| 18 ]; |
| 19 var scrollRects = [ |
| 20 {layerId: "3", x: 10, y: 10, width: 10, height: 10, type: "WheelEventHan
dler", unchanged: true}, |
| 21 {layerId: "2", x: 0, y: 10, width: 10, height: 10, type: "RepaintsOnScro
ll", unchanged: true}, |
| 22 {layerId: "3", x: 10, y: 0, width: 10, height: 10, type: "TouchEventHand
ler", unchanged: true}, |
| 23 {layerId: "4", x: 0, y: 0, width: 10, height: 10, type: "TouchEventHandl
er", unchanged: true} |
| 24 ]; |
| 25 var changedScrollRects = [ |
| 26 {layerId: "3", x: 0, y: 0, width: 10, height: 10, type: "WheelEventHandl
er"}, |
| 27 {layerId: "3", x: 10, y: 0, width: 10, height: 10, type: "TouchEventHand
ler"}, |
| 28 {layerId: "4", x: 0, y: 0, width: 10, height: 10, type: "TouchEventHandl
er"} |
| 29 ]; |
| 30 |
| 31 function onGotLayers() |
| 32 { |
| 33 InspectorTest.addResult("Initial scroll rectangles"); |
| 34 InspectorTest._layerTreeModel._layerTreeChanged(layers, scrollRects); |
| 35 InspectorTest.dumpViewScrollRects(); |
| 36 InspectorTest.dumpModelScrollRects(); |
| 37 |
| 38 InspectorTest.addResult("Updated scroll rectangles"); |
| 39 InspectorTest._layerTreeModel._layerTreeChanged(changedLayers, changedSc
rollRects); |
| 40 InspectorTest.dumpViewScrollRects(); |
| 41 InspectorTest.dumpModelScrollRects(); |
| 42 |
| 43 InspectorTest.completeTest(); |
| 44 } |
| 45 |
| 46 WebInspector.showPanel("layers"); |
| 47 InspectorTest.requestLayers(onGotLayers); |
| 48 } |
| 49 </script> |
| 50 </head> |
| 51 <body onload="runTest()"> |
| 52 </body> |
| 53 </html> |
OLD | NEW |