From 1767a8c6d66c075780af5382909449a0307c0784 Mon Sep 17 00:00:00 2001 From: Tomasz Gucio <72562119+tgucio@users.noreply.github.com> Date: Fri, 15 Mar 2024 18:39:06 +0100 Subject: [PATCH] Add missing baseline check in text layout tests (flutter/engine#51444) This PR adds a check for the `baseline` value in text layout service tests that appears to be missing. Test-exempt: increasing test coverage only. --- .../lib/web_ui/test/html/text/layout_service_helper.dart | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/engine/src/flutter/lib/web_ui/test/html/text/layout_service_helper.dart b/engine/src/flutter/lib/web_ui/test/html/text/layout_service_helper.dart index e516d199ec..545001c3a0 100644 --- a/engine/src/flutter/lib/web_ui/test/html/text/layout_service_helper.dart +++ b/engine/src/flutter/lib/web_ui/test/html/text/layout_service_helper.dart @@ -107,6 +107,13 @@ void expectLines(CanvasParagraph paragraph, List expectedLines) { 'line #$i had a different `left` value: "${line.left}" vs. "${expectedLine.left}"', ); } + if (expectedLine.baseline != null) { + expect( + line.baseline, + expectedLine.baseline, + reason: 'line #$i had a different `baseline` value: "${line.baseline}" vs. "${expectedLine.baseline}"', + ); + } } }