| 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/timeline-test.js"></script> | 4 <script src="../../../http/tests/inspector/timeline-test.js"></script> |
| 5 <script> | 5 <script> |
| 6 function performActions() | 6 function performActions() |
| 7 { | 7 { |
| 8 var callback; | 8 var callback; |
| 9 var promise = new Promise((fulfill) => callback = fulfill); | 9 var promise = new Promise((fulfill) => callback = fulfill); |
| 10 var square = document.getElementById("square"); | 10 var square = document.getElementById("square"); |
| (...skipping 21 matching lines...) Expand all Loading... |
| 32 panel._onModeChanged(); | 32 panel._onModeChanged(); |
| 33 | 33 |
| 34 InspectorTest.invokeAsyncWithTimeline("performActions", onRecordingDone); | 34 InspectorTest.invokeAsyncWithTimeline("performActions", onRecordingDone); |
| 35 var paintEvents = []; | 35 var paintEvents = []; |
| 36 function onRecordingDone() | 36 function onRecordingDone() |
| 37 { | 37 { |
| 38 var events = InspectorTest.timelineModel()._mainThreadEvents; | 38 var events = InspectorTest.timelineModel()._mainThreadEvents; |
| 39 for (var event of events) { | 39 for (var event of events) { |
| 40 if (event.name === WebInspector.TimelineModel.RecordType.Paint) { | 40 if (event.name === WebInspector.TimelineModel.RecordType.Paint) { |
| 41 paintEvents.push(event); | 41 paintEvents.push(event); |
| 42 if (!event.picture) | 42 if (!WebInspector.TimelineData.forEvent(event).picture) |
| 43 InspectorTest.addResult("Event without picture at " + paintE
vents.length); | 43 InspectorTest.addResult("Event without picture at " + paintE
vents.length); |
| 44 } | 44 } |
| 45 } | 45 } |
| 46 | 46 |
| 47 if (paintEvents.length < 2) | 47 if (paintEvents.length < 2) |
| 48 throw new Error("FAIL: Expect at least two paint events"); | 48 throw new Error("FAIL: Expect at least two paint events"); |
| 49 | 49 |
| 50 InspectorTest.addSniffer(panel, "_appendDetailsTabsForTraceEventAndShowD
etails", onRecordDetailsReady, false); | 50 InspectorTest.addSniffer(panel, "_appendDetailsTabsForTraceEventAndShowD
etails", onRecordDetailsReady, false); |
| 51 panel.select(WebInspector.TimelineSelection.fromTraceEvent(paintEvents[0
]), WebInspector.TimelinePanel.DetailsTab.PaintProfiler); | 51 panel.select(WebInspector.TimelineSelection.fromTraceEvent(paintEvents[0
]), WebInspector.TimelinePanel.DetailsTab.PaintProfiler); |
| 52 } | 52 } |
| (...skipping 25 matching lines...) Expand all Loading... |
| 78 | 78 |
| 79 <body onload="runTest()"> | 79 <body onload="runTest()"> |
| 80 <p> | 80 <p> |
| 81 Tests that paint profiler is properly update when an event is selected in Flame
Chart | 81 Tests that paint profiler is properly update when an event is selected in Flame
Chart |
| 82 </p> | 82 </p> |
| 83 | 83 |
| 84 <div id="square" style="width: 40px; height: 40px"></div> | 84 <div id="square" style="width: 40px; height: 40px"></div> |
| 85 | 85 |
| 86 </body> | 86 </body> |
| 87 </html> | 87 </html> |
| OLD | NEW |