Skip to content

Commit 5987563

Browse files
authored
enable more tests in web mode (#141791)
- Unskip `text_style_test` for CanvasKit. - Remove no longer necessary `kIsWeb` checks in a few tests. This PR depends on flutter/engine#49786, which rolled into the framework. If the engine PR needs to be reverted, this PR will need to be reverted too.
1 parent cdf82b2 commit 5987563

4 files changed

Lines changed: 6 additions & 15 deletions

File tree

dev/bots/test.dart

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,6 @@ const Map<String, List<String>> kWebTestFileKnownFailures = <String, List<String
160160

161161
// These tests are broken and need to be fixed.
162162
// TODO(yjbanov): https://github.com/flutter/flutter/issues/71604
163-
'test/painting/text_style_test.dart',
164163
'test/material/text_field_test.dart',
165164
'test/widgets/performance_overlay_test.dart',
166165
'test/widgets/html_element_view_test.dart',

packages/flutter/test/painting/decoration_test.dart

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -329,10 +329,7 @@ void main() {
329329
expect(paint.color, const Color(0x7F000000)); // 0.5 opacity
330330
expect(paint.filterQuality, FilterQuality.high);
331331
expect(paint.isAntiAlias, true);
332-
// TODO(yjbanov): remove kIsWeb when https://github.com/flutter/engine/pull/49786 rolls in
333-
if (!kIsWeb) {
334-
expect(paint.invertColors, isTrue);
335-
}
332+
expect(paint.invertColors, isTrue);
336333
});
337334

338335
test('DecorationImage.toString', () async {

packages/flutter/test/painting/text_style_test.dart

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44

55
import 'dart:ui' as ui show FontFeature, FontVariation, ParagraphStyle, Shadow, TextStyle;
66

7-
import 'package:flutter/foundation.dart';
87
import 'package:flutter/painting.dart';
98
import 'package:flutter_test/flutter_test.dart';
109

@@ -30,8 +29,7 @@ class _DartUiTextStyleToStringMatcher extends Matcher {
3029
_propertyToString('letterSpacing', textStyle.letterSpacing),
3130
_propertyToString('wordSpacing', textStyle.wordSpacing),
3231
_propertyToString('height', textStyle.height),
33-
// TODO(yjbanov): remove kIsWeb when https://github.com/flutter/engine/pull/49786 rolls in
34-
if (!kIsWeb) _propertyToString('leadingDistribution', textStyle.leadingDistribution),
32+
_propertyToString('leadingDistribution', textStyle.leadingDistribution),
3533
_propertyToString('locale', textStyle.locale),
3634
_propertyToString('background', textStyle.background),
3735
_propertyToString('foreground', textStyle.foreground),

packages/flutter/test/rendering/layers_test.dart

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -372,13 +372,10 @@ void main() {
372372
final BackdropFilterLayer layer = BackdropFilterLayer(filter: filter, blendMode: BlendMode.clear);
373373
final List<String> info = getDebugInfo(layer);
374374

375-
// TODO(yjbanov): remove kIsWeb when https://github.com/flutter/engine/pull/49786 rolls in
376-
if (!kIsWeb) {
377-
expect(
378-
info,
379-
contains('filter: ImageFilter.blur(${1.0}, ${1.0}, repeated)'),
380-
);
381-
}
375+
expect(
376+
info,
377+
contains('filter: ImageFilter.blur(${1.0}, ${1.0}, repeated)'),
378+
);
382379
expect(info, contains('blendMode: clear'));
383380
});
384381

0 commit comments

Comments
 (0)