[web:canvaskit] test zero font size (flutter/engine#37916)

* [web:canvaskit] test zero font size

* Noop change to trigger golden uploads

Co-authored-by: Mouad Debbar <mouad.debbar@gmail.com>
This commit is contained in:
Yegor
2022-12-06 12:40:05 -08:00
committed by GitHub
parent 76525fe805
commit 46df95a467

View File

@@ -374,6 +374,22 @@ void testMain() {
await testTextStyle('font size', fontSize: 24);
});
// A regression test for the special case when CanvasKit would default to
// a positive font size when Flutter specifies zero.
//
// See: https://github.com/flutter/flutter/issues/98248
test('text styles - zero font size', () async {
// This only sets the inner text style, but not the paragraph style, so
// "Hello" should be visible, but "World!" should disappear.
await testTextStyle('zero font size', fontSize: 0);
// This sets the paragraph font size to zero, but the inner text gets
// an explicit non-zero size that should override paragraph properties,
// so this time "Hello" should disappear, but "World!" should still be
// visible.
await testTextStyle('zero paragraph font size', paragraphFontSize: 0, fontSize: 14);
});
test('text styles - letter spacing', () async {
await testTextStyle('letter spacing', letterSpacing: 5);
});