Chromium Code Reviews| 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 scrollRects: [{rect: {x: 0, y: 10, width: 10, height: 10}, type: "Repai ntsOnScroll", unchanged: true}]}, | |
|
caseq
2014/02/27 13:46:55
please format similar to protocol.json
malch
2014/02/27 14:58:59
Done.
| |
| 12 {layerId: "3", offsetX: 0, offsetY: 0, width: 50, height: 50, paintCount : 0, parentLayerId: "2", nodeId: 1, | |
| 13 scrollRects: [{rect: {x: 10, y: 10, width: 10, height: 10}, type: "Whee lEventHandler", unchanged: true}, | |
| 14 {rect: {x: 10, y: 0, width: 10, height: 10}, type: "Touch EventHandler", unchanged: true}]}, | |
| 15 {layerId: "4", offsetX: 0, offsetY: 0, width: 50, height: 50, paintCount : 0, parentLayerId: "3", nodeId: 2, | |
| 16 scrollRects: [{rect: {x: 0, y: 0, width: 10, height: 10}, type: "TouchE ventHandler", unchanged: true}]} | |
| 17 ]; | |
| 18 var changedLayers = [ | |
| 19 {layerId: "1", offsetX: 0, offsetY: 0, width: 0, height: 0, paintCount: 0}, | |
| 20 {layerId: "3", offsetX: 0, offsetY: 0, width: 50, height: 50, paintCount : 0, parentLayerId: "1", nodeId: 1, | |
| 21 scrollRects: [{rect: {x: 0, y: 0, width: 10, height: 10}, type: "WheelE ventHandler"}, | |
| 22 {rect: {x: 10, y: 0, width: 10, height: 10}, type: "Touch EventHandler"}]}, | |
| 23 {layerId: "4", offsetX: 0, offsetY: 0, width: 50, height: 50, paintCount : 0, parentLayerId: "3", nodeId: 2, | |
| 24 scrollRects: [{rect: {x: 0, y: 0, width: 10, height: 10}, type: "TouchE ventHandler"}]} | |
| 25 ]; | |
| 26 | |
| 27 function onGotLayers() | |
| 28 { | |
| 29 InspectorTest.addResult("Initial scroll rectangles"); | |
| 30 InspectorTest._layerTreeModel._layerTreeChanged(layers); | |
| 31 InspectorTest.dumpViewScrollRects(); | |
| 32 InspectorTest.dumpModelScrollRects(); | |
| 33 | |
| 34 InspectorTest.addResult("Updated scroll rectangles"); | |
| 35 InspectorTest._layerTreeModel._layerTreeChanged(changedLayers); | |
| 36 InspectorTest.dumpViewScrollRects(); | |
| 37 InspectorTest.dumpModelScrollRects(); | |
| 38 | |
| 39 InspectorTest.completeTest(); | |
| 40 } | |
| 41 | |
| 42 WebInspector.showPanel("layers"); | |
| 43 InspectorTest.requestLayers(onGotLayers); | |
| 44 } | |
| 45 </script> | |
| 46 </head> | |
| 47 <body onload="runTest()"> | |
| 48 </body> | |
| 49 </html> | |
| OLD | NEW |