Skip to content

[Web] TextStyle.toString does not match expectations #56307

@Piinks

Description

@Piinks

Following up on two skipped tests that fail against expected TextStyle.toString:

Test name: TextStyle control test

01:50 +178 ~5 -1: /tmp/flutter sdk/packages/flutter/test/painting/text_style_test.dart: TextStyle control test [E]                                                                                     
  Expected: 'TextStyle(color: unspecified, decoration: unspecified, decorationColor: unspecified, decorationStyle: unspecified, decorationThickness: unspecified, fontWeight: FontWeight.w700, fontStyle: unspecified, textBaseline: unspecified, fontFamily: unspecified, fontFamilyFallback: unspecified, fontSize: 12.0, letterSpacing: unspecified, wordSpacing: unspecified, height: 123.0x, locale: unspecified, background: unspecified, foreground: unspecified, shadows: unspecified, fontFeatures: unspecified)'
    Actual: 'TextStyle(color: unspecified, decoration: unspecified, decorationColor: unspecified, decorationStyle: unspecified, fontWeight: FontWeight.w700, fontStyle: unspecified, textBaseline: unspecified, fontFamily: unspecified, fontFamilyFallback: unspecified, fontSize: 12.0, letterSpacing: unspecified, wordSpacing: unspecified, height: 123.0x, locale: unspecified, background: unspecified, foreground: unspecified, shadows: unspecified)'
     Which: is different.
            Expected: ... pecified, decoration ...
              Actual: ... pecified, fontWeight ...
                                    ^
             Differ at offset 115
  package:dart-sdk/lib/_internal/js_dev_runtime/private/ddc_runtime/errors.dart 216:49      throw_
  package:test_api                                                                          expect$
  text_style_test.dart 172:5                                                                <fn>

And another with same result:

Test name: TextStyle using package font

01:50 +179 ~5 -2: /tmp/flutter sdk/packages/flutter/test/painting/text_style_test.dart: TextStyle using package font [E]                                                                               
  Expected: 'TextStyle(color: unspecified, decoration: unspecified, decorationColor: unspecified, decorationStyle: unspecified, decorationThickness: unspecified, fontWeight: unspecified, fontStyle: unspecified, textBaseline: unspecified, fontFamily: test, fontFamilyFallback: unspecified, fontSize: unspecified, letterSpacing: unspecified, wordSpacing: unspecified, height: unspecified, locale: unspecified, background: unspecified, foreground: unspecified, shadows: unspecified, fontFeatures: unspecified)'
    Actual: 'TextStyle(color: unspecified, decoration: unspecified, decorationColor: unspecified, decorationStyle: unspecified, fontWeight: unspecified, fontStyle: unspecified, textBaseline: unspecified, fontFamily: test, fontFamilyFallback: unspecified, fontSize: unspecified, letterSpacing: unspecified, wordSpacing: unspecified, height: unspecified, locale: unspecified, background: unspecified, foreground: unspecified, shadows: unspecified)'
     Which: is different.
            Expected: ... pecified, decoration ...
              Actual: ... pecified, fontWeight ...
                                    ^
             Differ at offset 115
  package:dart-sdk/lib/_internal/js_dev_runtime/private/ddc_runtime/errors.dart 216:49      throw_
  package:test_api                                                                          expect$
  text_style_test.dart 195:5                                                                <fn>

The TextStyle font family fallback test also has a similar result, but I have attributed it to #32233

Metadata

Metadata

Assignees

No one assigned

    Labels

    a: tests"flutter test", flutter_test, or one of our testsa: typographyText rendering, possibly libtxtc: contributor-productivityTeam-specific productivity, code health, technical debt.frameworkflutter/packages/flutter repository. See also f: labels.platform-webWeb applications specifically

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions