Skip to content

Commit 09b8368

Browse files
jackfranklinDevtools-frontend LUCI CQ
authored andcommitted
Migrate more perf interaction tests to unit tests
This were all very straight forward, or had existing tests from previous CLs meaning the existing interaction files could just be removed. Fixed: 413414305, 413414131, 413414690, 413414345, 413414673, 413414407 Change-Id: I1130972d3b73197f19db998c5210abd776dc8a08 Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/6602533 Auto-Submit: Jack Franklin <jacktfranklin@chromium.org> Reviewed-by: Finnur Thorarinsson <finnur@chromium.org> Commit-Queue: Finnur Thorarinsson <finnur@chromium.org>
1 parent 0e68ea4 commit 09b8368

28 files changed

+67
-173
lines changed

front_end/ui/legacy/components/perf_ui/FlameChart.test.ts

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1182,6 +1182,73 @@ describeWithEnvironment('FlameChart', () => {
11821182
await assertScreenshot('timeline/flamechart_with_vertical_offset.png');
11831183
});
11841184

1185+
it('renders the animations track', async function() {
1186+
await renderFlameChartIntoDOM(this, {
1187+
traceFile: 'animation.json.gz',
1188+
filterTracks(trackName) {
1189+
return trackName.startsWith('Animation');
1190+
},
1191+
expandTracks() {
1192+
return true;
1193+
},
1194+
});
1195+
await assertScreenshot('timeline/animations_track.png');
1196+
});
1197+
1198+
it('renders the GPU track', async function() {
1199+
await renderFlameChartIntoDOM(this, {
1200+
traceFile: 'threejs-gpu.json.gz',
1201+
filterTracks(trackName) {
1202+
return trackName.startsWith('GPU');
1203+
},
1204+
expandTracks() {
1205+
return true;
1206+
},
1207+
});
1208+
await assertScreenshot('timeline/gpu_track.png');
1209+
});
1210+
1211+
it('renders the user timing track', async function() {
1212+
await renderFlameChartIntoDOM(this, {
1213+
traceFile: 'timings-track.json.gz',
1214+
filterTracks(trackName) {
1215+
return trackName.startsWith('Timings');
1216+
},
1217+
expandTracks() {
1218+
return true;
1219+
},
1220+
});
1221+
await assertScreenshot('timeline/timings_track.png');
1222+
});
1223+
1224+
it('renders the auction worklets track', async function() {
1225+
await renderFlameChartIntoDOM(this, {
1226+
traceFile: 'fenced-frame-fledge.json.gz',
1227+
filterTracks(trackName) {
1228+
return trackName.includes('Worklet');
1229+
},
1230+
expandTracks() {
1231+
return true;
1232+
},
1233+
customStartTime: Trace.Types.Timing.Milli(220391498.289),
1234+
customEndTime: Trace.Types.Timing.Milli(220391697.601),
1235+
});
1236+
await assertScreenshot('timeline/auction_worklets_track.png');
1237+
});
1238+
1239+
it('renders the layout shifts track', async function() {
1240+
await renderFlameChartIntoDOM(this, {
1241+
traceFile: 'cls-single-frame.json.gz',
1242+
filterTracks(trackName) {
1243+
return trackName.startsWith('LayoutShifts');
1244+
},
1245+
expandTracks() {
1246+
return true;
1247+
},
1248+
});
1249+
await assertScreenshot('timeline/layout_shifts_track.png');
1250+
});
1251+
11851252
it('renders all the decoration types onto events', async () => {
11861253
class FakeProviderWithDecorations extends FakeFlameChartProvider {
11871254
override timelineData(): PerfUI.FlameChart.FlameChartTimelineData|null {
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
-3.55 KB
Binary file not shown.
Binary file not shown.
Binary file not shown.

0 commit comments

Comments
 (0)