From 0844726ab3da72a43609257b4be827de6515e903 Mon Sep 17 00:00:00 2001 From: Polina Cherkasova Date: Mon, 11 Sep 2023 10:12:02 -0700 Subject: [PATCH] Mark leak: instances of OpacityLayer, created by _RenderChip, should be disposed. (#134395) --- packages/flutter/test/material/chip_test.dart | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/packages/flutter/test/material/chip_test.dart b/packages/flutter/test/material/chip_test.dart index 0d8c0576409f..e7708dd28c50 100644 --- a/packages/flutter/test/material/chip_test.dart +++ b/packages/flutter/test/material/chip_test.dart @@ -217,7 +217,7 @@ Finder findTooltipContainer(String tooltipText) { } void main() { - testWidgets('M2 Chip defaults', (WidgetTester tester) async { + testWidgetsWithLeakTracking('M2 Chip defaults', (WidgetTester tester) async { late TextTheme textTheme; Widget buildFrame(Brightness brightness) { @@ -292,7 +292,12 @@ void main() { expect(labelStyle.overflow, textTheme.bodyLarge?.overflow); expect(labelStyle.textBaseline, textTheme.bodyLarge?.textBaseline); expect(labelStyle.wordSpacing, textTheme.bodyLarge?.wordSpacing); - }); + }, + // TODO(polina-c): remove after fixing + // https://github.com/flutter/flutter/issues/134394 + leakTrackingTestConfig: const LeakTrackingTestConfig( + notDisposedAllowList: {'OpacityLayer': 2}, + )); testWidgetsWithLeakTracking('M3 Chip defaults', (WidgetTester tester) async { late TextTheme textTheme;