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

Commit 9c48c87

Browse files
Kingtous金韬
authored and
金韬
committed
add: golden test
1 parent efbd4ba commit 9c48c87

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

lib/web_ui/test/html/compositing/canvas_mask_filter_golden_test.dart

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,32 @@ Future<void> testMain() async {
150150
await canvasScreenshot(rc, 'mask_filter_transformed_$browser',
151151
region: screenRect);
152152
});
153+
154+
test('multiple MaskFilter.blur in $browser', () async {
155+
const double screenWidth = 300.0;
156+
const double screenHeight = 300.0;
157+
const ui.Rect screenRect =
158+
ui.Rect.fromLTWH(0, 0, screenWidth, screenHeight);
159+
160+
ContextStateHandle.debugEmulateWebKitMaskFilter = isWebkit;
161+
final RecordingCanvas rc = RecordingCanvas(screenRect);
162+
163+
final SurfacePaint paint = SurfacePaint()
164+
..maskFilter = const ui.MaskFilter.blur(ui.BlurStyle.normal, 5);
165+
rc.drawCircle(const ui.Offset(150, 150), 100,
166+
paint..color = const ui.Color(0xFFC8C800));
167+
rc.drawCircle(const ui.Offset(150, 150), 50,
168+
paint..color = const ui.Color(0xFFC800C8));
169+
rc.drawCircle(
170+
const ui.Offset(150, 150),
171+
20,
172+
paint
173+
..color = const ui.Color(0xFF00C8C8)
174+
..maskFilter = const ui.MaskFilter.blur(ui.BlurStyle.normal, 10));
175+
176+
await canvasScreenshot(rc, 'multiple_mask_filter_$browser',
177+
region: screenRect);
178+
});
153179
}
154180

155181
testMaskFilterBlur();

0 commit comments

Comments
 (0)