Repository navigation
Description
As part of the skip test audit (#86396), there is a problem with debugFillProperties on the web that causes a couple of tests to fail.
Dart doubles and ints are backed by the same kind of object because JavaScript does not support integers. So, the Dart double "4.0" is identical to "4", which results in the web evaluating to the value "4" regardless of which one is used. This results in a difference for doubles in debugFillProperties between the web and the rest of Flutter's target platforms.
So when we are testing diagnostic strings in tests they will fail even though the data is almost identical. For example if we turn off the skip on:
| test('DecorationImage with null textDirection configuration should throw Error', () async { |
It will fail with a difference in the error strings that are generated:
Expected: 'FlutterError\n'
' DecorationImage.matchTextDirection can only be used when a\n'
' TextDirection is available.\n'
' When DecorationImagePainter.paint() was called, there was no text\n'
' direction provided in the ImageConfiguration object to match.\n'
' The DecorationImage was:\n'
' DecorationImage(SynchronousTestImageProvider(),\n'
' Alignment.center, match text direction, scale: 1.0)\n'
' The ImageConfiguration was:\n'
' ImageConfiguration(size: Size(100.0, 100.0))\n'
''
Actual: 'FlutterError\n'
' DecorationImage.matchTextDirection can only be used when a\n'
' TextDirection is available.\n'
' When DecorationImagePainter.paint() was called, there was no text\n'
' direction provided in the ImageConfiguration object to match.\n'
' The DecorationImage was:\n'
' DecorationImage(SynchronousTestImageProvider(),\n'
' Alignment.center, match text direction, scale: 1)\n'
' The ImageConfiguration was:\n'
' ImageConfiguration(size: Size(100.0, 100.0))\n'
''
Which: is different.
Expected: ... , scale: 1.0)\n Th ...
Actual: ... , scale: 1)\n The ...
^
Differ at offset 381
We should find a way to fix this or workaround it.
Another test that is turned off because of this is:
| testWidgets('AppBarTheme implements debugFillProperties', (WidgetTester tester) async { |
Activity
[web] Unskip 8 passing image tests in painting and rendering (flutter…
[web] Unskip 8 passing image tests in painting and rendering (flutter…
[web] Unskip 8 passing image tests in painting and rendering (flutter…
[material_ui] Unskip web tests that pass on CanvasKit and Skwasm: app…