| <html> |
| <head> |
| <script src="../../http/tests/inspector/inspector-test.js"></script> |
| <script src="../../http/tests/inspector/layers-test.js"></script> |
| <script> |
| function test() |
| { |
| function onSnapshotDone(snapshot) |
| { |
| var wrappedCallback = InspectorBackend.wrapClientCallback(onHistoryReceived, "LayerTreeAgent.snapshotCommandLog(): "); |
| InspectorTest.LayerTreeAgent.snapshotCommandLog(snapshot._id, wrappedCallback); |
| } |
| |
| function onHistoryReceived(history) |
| { |
| InspectorTest.addResult("Canvas log:"); |
| InspectorTest.addObject(history, {"uniqueID": "skip"}); |
| InspectorTest.completeTest(); |
| } |
| |
| function onGotLayers() |
| { |
| var layer = InspectorTest.findLayerByNodeIdAttribute("a"); |
| layer.requestSnapshot(onSnapshotDone); |
| } |
| |
| InspectorTest.requestLayers(onGotLayers); |
| } |
| </script> |
| </head> |
| <body onload="runTest()"> |
| <div id="a" style="transform: translateZ(0px); background-color:blue; width:100px; height:100px;"> |
| <div style="width:50px; height:50px; background-color:red;"></div> |
| <img src="../tracing/resources/test.png"> |
| <svg> |
| <rect x="0" y="0" width="10" height="10" style="opacity:0.5"/> |
| </svg> |
| </div> |
| </body> |
| </html> |