Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Commit e2c0454

Browse files
authored
remove 10s timeouts from tests (#16988)
1 parent 1ab5c36 commit e2c0454

12 files changed

+34
-38
lines changed

lib/web_ui/test/golden_tests/engine/canvas_arc_golden_test.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ void main() async {
4545

4646
html.document.body.append(canvas.rootElement);
4747
await matchGoldenFile('canvas_arc_to_point.png', region: region);
48-
}, timeout: const Timeout(Duration(seconds: 10)));
48+
});
4949

5050
}
5151

lib/web_ui/test/golden_tests/engine/canvas_draw_points_test.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,5 +53,5 @@ void main() async {
5353

5454
html.document.body.append(canvas.rootElement);
5555
await matchGoldenFile('canvas_draw_points.png', region: region);
56-
}, timeout: const Timeout(Duration(seconds: 10)));
56+
});
5757
}

lib/web_ui/test/golden_tests/engine/canvas_golden_test.dart

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ void main() async {
7979
appendToScene();
8080

8181
await matchGoldenFile('misaligned_pixels_in_canvas_test.png', region: region);
82-
}, timeout: const Timeout(Duration(seconds: 10)));
82+
});
8383

8484
test('compensates for misalignment of the canvas', () async {
8585
// Notice the 0.5 offset in the bounds rectangle. It's what causes the
@@ -94,7 +94,7 @@ void main() async {
9494
appendToScene();
9595

9696
await matchGoldenFile('misaligned_canvas_test.png', region: region);
97-
}, timeout: const Timeout(Duration(seconds: 10)));
97+
});
9898

9999
test('fill the whole canvas with color even when transformed', () async {
100100
canvas = BitmapCanvas(const Rect.fromLTWH(0, 0, 50, 50));
@@ -105,7 +105,7 @@ void main() async {
105105
appendToScene();
106106

107107
await matchGoldenFile('bitmap_canvas_fills_color_when_transformed.png', region: region);
108-
}, timeout: const Timeout(Duration(seconds: 10)));
108+
});
109109

110110
test('fill the whole canvas with paint even when transformed', () async {
111111
canvas = BitmapCanvas(const Rect.fromLTWH(0, 0, 50, 50));
@@ -118,7 +118,7 @@ void main() async {
118118
appendToScene();
119119

120120
await matchGoldenFile('bitmap_canvas_fills_paint_when_transformed.png', region: region);
121-
}, timeout: const Timeout(Duration(seconds: 10)));
121+
});
122122

123123
// This test reproduces text blurriness when two pieces of text appear inside
124124
// two nested clips:
@@ -171,7 +171,7 @@ void main() async {
171171
maxDiffRatePercent: 0.0,
172172
pixelComparison: PixelComparison.precise,
173173
);
174-
}, timeout: const Timeout(Duration(seconds: 10)), testOn: 'chrome');
174+
}, testOn: 'chrome');
175175

176176
// NOTE: Chrome in --headless mode does not reproduce the bug that this test
177177
// attempts to reproduce. However, it's still good to have this test

lib/web_ui/test/golden_tests/engine/canvas_lines_golden_test.dart

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,7 @@ void main() async {
3030

3131
html.document.body.append(canvas.rootElement);
3232
await matchGoldenFile('canvas_lines_thickness.png', region: region);
33-
}, timeout: const Timeout(Duration(seconds: 10)));
34-
33+
});
3534
}
3635

3736
void paintLines(BitmapCanvas canvas) {

lib/web_ui/test/golden_tests/engine/canvas_rect_golden_test.dart

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,7 @@ void main() async {
3030

3131
html.document.body.append(canvas.rootElement);
3232
await matchGoldenFile('canvas_rect_flipped.png', region: region);
33-
}, timeout: const Timeout(Duration(seconds: 10)));
34-
33+
});
3534
}
3635

3736
void paintRects(BitmapCanvas canvas) {

lib/web_ui/test/golden_tests/engine/canvas_rrect_golden_test.dart

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ void main() async {
4444

4545
html.document.body.append(canvas.rootElement);
4646
await matchGoldenFile('canvas_rrect_round_square.png', region: region);
47-
}, timeout: const Timeout(Duration(seconds: 10)));
47+
});
4848

4949
test('round rect with big radius scale down smaller radius', () async {
5050
for (int i = 0; i < 5; i++) {
@@ -60,7 +60,7 @@ void main() async {
6060

6161
html.document.body.append(canvas.rootElement);
6262
await matchGoldenFile('canvas_rrect_overlapping_radius.png', region: region);
63-
}, timeout: const Timeout(Duration(seconds: 10)));
63+
});
6464

6565
test('diff round rect with big radius scale down smaller radius', () async {
6666
for (int i = 0; i < 5; i++) {
@@ -83,5 +83,5 @@ void main() async {
8383

8484
html.document.body.append(canvas.rootElement);
8585
await matchGoldenFile('canvas_drrect_overlapping_radius.png', region: region);
86-
}, timeout: const Timeout(Duration(seconds: 10)));
86+
});
8787
}

lib/web_ui/test/golden_tests/engine/canvas_stroke_joins_golden_test.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ void main() async {
3030

3131
html.document.body.append(canvas.rootElement);
3232
await matchGoldenFile('canvas_stroke_joins.png', region: region);
33-
}, timeout: const Timeout(Duration(seconds: 10)));
33+
});
3434

3535
}
3636

lib/web_ui/test/golden_tests/engine/canvas_stroke_rects_golden_test.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ void main() async {
3131

3232
html.document.body.append(canvas.rootElement);
3333
await matchGoldenFile('canvas_stroke_rects.png', region: region);
34-
}, timeout: const Timeout(Duration(seconds: 10)));
34+
});
3535

3636
}
3737

lib/web_ui/test/golden_tests/engine/compositing_golden_test.dart

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ void main() async {
3939
html.document.body.append(builder.build().webOnlyRootElement);
4040

4141
await matchGoldenFile('compositing_shifted_clip_rect.png', region: region);
42-
}, timeout: const Timeout(Duration(seconds: 10)));
42+
});
4343

4444
test('pushClipRect with offset and transform', () async {
4545
final SurfaceSceneBuilder builder = SurfaceSceneBuilder();
@@ -60,7 +60,7 @@ void main() async {
6060

6161
await matchGoldenFile('compositing_clip_rect_with_offset_and_transform.png',
6262
region: region);
63-
}, timeout: const Timeout(Duration(seconds: 10)));
63+
});
6464

6565
test('pushClipRRect', () async {
6666
final SurfaceSceneBuilder builder = SurfaceSceneBuilder();
@@ -73,7 +73,7 @@ void main() async {
7373
html.document.body.append(builder.build().webOnlyRootElement);
7474

7575
await matchGoldenFile('compositing_shifted_clip_rrect.png', region: region);
76-
}, timeout: const Timeout(Duration(seconds: 10)));
76+
});
7777

7878
test('pushPhysicalShape', () async {
7979
final SurfaceSceneBuilder builder = SurfaceSceneBuilder();
@@ -102,7 +102,7 @@ void main() async {
102102

103103
await matchGoldenFile('compositing_shifted_physical_shape_clip.png',
104104
region: region);
105-
}, timeout: const Timeout(Duration(seconds: 10)));
105+
});
106106

107107
test('pushImageFilter', () async {
108108
final SurfaceSceneBuilder builder = SurfaceSceneBuilder();
@@ -115,7 +115,7 @@ void main() async {
115115
html.document.body.append(builder.build().webOnlyRootElement);
116116

117117
await matchGoldenFile('compositing_image_filter.png', region: region);
118-
}, timeout: const Timeout(Duration(seconds: 10)));
118+
});
119119

120120
group('Cull rect computation', () {
121121
_testCullRectComputation();
@@ -246,7 +246,7 @@ void _testCullRectComputation() {
246246

247247
final PersistedStandardPicture picture = enumeratePictures().single;
248248
expect(picture.optimalLocalCullRect, const Rect.fromLTRB(40, 40, 70, 70));
249-
}, timeout: const Timeout(Duration(seconds: 10)));
249+
});
250250

251251
// Draw a picture inside a layer clip but position the picture such that its
252252
// paint bounds overflow the layer clip. Verify that the cull rect is the
@@ -276,7 +276,7 @@ void _testCullRectComputation() {
276276

277277
final PersistedStandardPicture picture = enumeratePictures().single;
278278
expect(picture.optimalLocalCullRect, const Rect.fromLTRB(50, 40, 70, 70));
279-
}, timeout: const Timeout(Duration(seconds: 10)));
279+
});
280280

281281
// Draw a picture inside a layer clip that's positioned inside the clip using
282282
// an offset layer. Verify that the cull rect is the intersection between the
@@ -308,7 +308,7 @@ void _testCullRectComputation() {
308308
final PersistedStandardPicture picture = enumeratePictures().single;
309309
expect(picture.optimalLocalCullRect,
310310
const Rect.fromLTRB(-15.0, -20.0, 15.0, 0.0));
311-
}, timeout: const Timeout(Duration(seconds: 10)));
311+
});
312312

313313
// Draw a picture inside a layer clip that's positioned an offset layer such
314314
// that the picture is push completely outside the clip area. Verify that the
@@ -384,7 +384,7 @@ void _testCullRectComputation() {
384384
within(
385385
distance: 0.05, from: const Rect.fromLTRB(-14.1, -14.1, 14.1, 14.1)),
386386
);
387-
}, timeout: const Timeout(Duration(seconds: 10)));
387+
});
388388

389389
test('pushClipPath', () async {
390390
final SurfaceSceneBuilder builder = SurfaceSceneBuilder();
@@ -399,7 +399,7 @@ void _testCullRectComputation() {
399399
html.document.body.append(builder.build().webOnlyRootElement);
400400

401401
await matchGoldenFile('compositing_clip_path.png', region: region);
402-
}, timeout: const Timeout(Duration(seconds: 10)));
402+
});
403403

404404
// Draw a picture inside a rotated clip. Verify that the cull rect is big
405405
// enough to fit the rotated clip.
@@ -514,7 +514,7 @@ void _testCullRectComputation() {
514514
// from: Rect.fromLTRB(
515515
// -140, -140, screenWidth - 360.0, screenHeight + 40.0)),
516516
// );
517-
}, timeout: const Timeout(Duration(seconds: 10)));
517+
});
518518

519519
// This test reproduces text blurriness when two pieces of text appear inside
520520
// two nested clips:
@@ -597,7 +597,6 @@ void _testCullRectComputation() {
597597
pixelComparison: PixelComparison.precise,
598598
);
599599
},
600-
timeout: const Timeout(Duration(seconds: 10)),
601600
testOn: 'chrome',
602601
);
603602
}

lib/web_ui/test/golden_tests/engine/conic_golden_test.dart

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ void main() async {
5454
path.close();
5555

5656
await testPath(path, 'render_conic_1_w10');
57-
}, timeout: const Timeout(Duration(seconds: 10)));
57+
});
5858

5959
test('render conic with control point left of start point', () async {
6060
const double yStart = 20;
@@ -72,7 +72,7 @@ void main() async {
7272
path.close();
7373

7474
await testPath(path, 'render_conic_2_w10');
75-
}, timeout: const Timeout(Duration(seconds: 10)));
75+
});
7676

7777
test('render conic with control point above start point', () async {
7878
const double yStart = 20;
@@ -90,5 +90,5 @@ void main() async {
9090
path.close();
9191

9292
await testPath(path, 'render_conic_2');
93-
}, timeout: const Timeout(Duration(seconds: 10)));
93+
});
9494
}

0 commit comments

Comments
 (0)