| OLD | NEW |
| 1 <html> | 1 <html> |
| 2 <head> | 2 <head> |
| 3 <script src="../../http/tests/inspector/inspector-test.js"></script> | 3 <script src="../../http/tests/inspector/inspector-test.js"></script> |
| 4 <script src="../../http/tests/inspector/layers-test.js"></script> | 4 <script src="../../http/tests/inspector/layers-test.js"></script> |
| 5 <script src="../tracing-test.js"></script> | 5 <script src="../tracing-test.js"></script> |
| 6 | 6 |
| 7 <script> | 7 <script> |
| 8 function doActions(callback) | 8 function doActions(callback) |
| 9 { | 9 { |
| 10 var div = document.createElement("div"); | 10 var div = document.createElement("div"); |
| (...skipping 12 matching lines...) Expand all Loading... |
| 23 testRunner.displayAsyncThen(callback); | 23 testRunner.displayAsyncThen(callback); |
| 24 } | 24 } |
| 25 | 25 |
| 26 function test() | 26 function test() |
| 27 { | 27 { |
| 28 InspectorTest.invokeWithTracing(WebInspector.TracingTimelineModel.defaultTra
cingCategoryFilter, "doActions", onTracingComplete); | 28 InspectorTest.invokeWithTracing(WebInspector.TracingTimelineModel.defaultTra
cingCategoryFilter, "doActions", onTracingComplete); |
| 29 | 29 |
| 30 var target = /** @type {!WebInspector.Target} */ (WebInspector.targetManager
.activeTarget()); | 30 var target = /** @type {!WebInspector.Target} */ (WebInspector.targetManager
.activeTarget()); |
| 31 var layerTree = new WebInspector.TracingLayerTree(target); | 31 var layerTree = new WebInspector.TracingLayerTree(target); |
| 32 | 32 |
| 33 var tracineTimelineModel = new WebInspector.TracingTimelineModel(InspectorTe
st.tracingModel); | |
| 34 tracineTimelineModel.willStartRecordingTraceEvents(); | |
| 35 | |
| 36 function onTracingComplete() | 33 function onTracingComplete() |
| 37 { | 34 { |
| 38 tracineTimelineModel.didStopRecordingTraceEvents(); | 35 var events = InspectorTest.tracingTimelineModel.inspectedTargetEvents(); |
| 39 var events = tracineTimelineModel.inspectedTargetEvents(); | |
| 40 for (var i = events.length - 1; i >= 0; --i) { | 36 for (var i = events.length - 1; i >= 0; --i) { |
| 41 if (events[i].phase === WebInspector.TracingModel.Phase.SnapshotObje
ct && events[i].name === "cc::LayerTreeHostImpl") { | 37 if (events[i].phase === WebInspector.TracingModel.Phase.SnapshotObje
ct && events[i].name === "cc::LayerTreeHostImpl") { |
| 42 var rootLayer = events[i].args["snapshot"]["active_tree"]["root_
layer"]; | 38 var rootLayer = events[i].args["snapshot"]["active_tree"]["root_
layer"]; |
| 43 dumpLayerTreeSnapshot(rootLayer); | 39 dumpLayerTreeSnapshot(rootLayer); |
| 44 return; | 40 return; |
| 45 } | 41 } |
| 46 } | 42 } |
| 47 InspectorTest.addResult("FAIL: cc::LayerTreeHostImpl snapshot not found"
); | 43 InspectorTest.addResult("FAIL: cc::LayerTreeHostImpl snapshot not found"
); |
| 48 InspectorTest.completeTest(); | 44 InspectorTest.completeTest(); |
| 49 } | 45 } |
| (...skipping 17 matching lines...) Expand all Loading... |
| 67 </p> | 63 </p> |
| 68 <div id="a" style="width: 200px; height: 200px" class="layer"> | 64 <div id="a" style="width: 200px; height: 200px" class="layer"> |
| 69 <div class="layer" id="b1" style="width: 150px; height: 100px"></div> | 65 <div class="layer" id="b1" style="width: 150px; height: 100px"></div> |
| 70 <div id="b2" class="layer" style="width: 140px; height: 110px"> | 66 <div id="b2" class="layer" style="width: 140px; height: 110px"> |
| 71 <div id="c" class="layer" style="width: 100px; height: 90px"></div> | 67 <div id="c" class="layer" style="width: 100px; height: 90px"></div> |
| 72 </div> | 68 </div> |
| 73 <div id="b3" class="layer" style="width: 140px; height: 110px"></div> | 69 <div id="b3" class="layer" style="width: 140px; height: 110px"></div> |
| 74 </div> | 70 </div> |
| 75 </body> | 71 </body> |
| 76 </html> | 72 </html> |
| OLD | NEW |