Skip to content

[Web] InputDecorator Test - Expected closure does not match #55317

Closed
flutter/packages
#13352

Description

@Piinks

[From Skip Audit]

Here is the broken test:

expect(findBorderPainter(), paints

Results:

04:21 +597 ~14 -1: /tmp/flutter sdk/packages/flutter/test/material/input_decorator_test.dart: OutlineInputBorder borders scale down to fit when large values are passed in                             
══╡ EXCEPTION CAUGHT BY FLUTTER TEST FRAMEWORK ╞════════════════════════════════════════════════════
The following TestFailure object was thrown running a test:
  Expected: Object or closure painting: 'save()', 'a path with Color(0xff00ff00),
PaintingStyle.fill, that contains [Offset(400.0, 0.0), Offset(400.0, 56.0), Offset(0.0, 28.0),
Offset(800.0, 28.0), Offset(800.0, 28.0), Offset(772.0, 56.0), Offset(800.0, 28.0), Offset(772.0,
0.0), Offset(0.0, 42.0), Offset(14.0, 56.0), Offset(0.0, 14.0), Offset(14.0, 0.0)] and does not
contain [Offset(0.0, 0.0), Offset(800.0, 0.0), Offset(0.0, 56.0), Offset(800.0, 56.0), Offset(800.0,
42.0), Offset(786.0, 800.0), Offset(800.0, 14.0), Offset(786.0, 0.0)]', 'restore()'
  Actual: _DescendantFinder:<exactly one widget with widget matching predicate (Closure: (Widget) =>
bool from: w => basic.CustomPaint.is(w)) that has ancestor(s) with widget matching predicate
(Closure: (Widget) => bool from: w => dart.str(dart.runtimeType(w)) === "_BorderContainer")
(ignoring offstage widgets): CustomPaint(renderObject: RenderCustomPaint#380b8)>
   Which: did not match the pattern.
          It called drawPath with a path that unexpectedly did not contain Offset(800.0, 28.0).
          The stack of the offending call was:
            package:dart-sdk/lib/_internal/js_dev_runtime/private/ddc_runtime/errors.dart 247:20
get current
            ../rendering/recording_canvas.dart 89:70
noSuchMethod
            ../rendering/recording_canvas.dart 90:3
drawPath
            package:flutter/src/material/input_decorator.dart 98:13
paint
            package:flutter/src/rendering/custom_paint.dart 531:12
[_paintWithPainter]
            package:flutter/src/rendering/custom_paint.dart 577:7
paint
            ../rendering/mock_canvas.dart 516:19
_evaluatePainter
            ../rendering/mock_canvas.dart 533:12
matches
            package:test_api/src/frontend/expect.dart 142:17
_expect
            package:test_api/src/frontend/expect.dart 60:3
expect$
            package:flutter_test/src/widget_tester.dart 348:3
expect$
            input_decorator_test.dart 3612:5
<fn>
            package:dart-sdk/lib/_internal/js_dev_runtime/patch/async_patch.dart 47:50
onValue
            package:dart-sdk/lib/async/zone.dart 1192:38
_rootRunUnary
            package:dart-sdk/lib/async/zone.dart 1085:19
runUnary
            package:dart-sdk/lib/async/future_impl.dart 141:18
handleValue
            package:dart-sdk/lib/async/future_impl.dart 682:44
handleValueCallback
            package:dart-sdk/lib/async/future_impl.dart 711:32
_propagateToListeners
            package:dart-sdk/lib/async/future_impl.dart 526:5
[_completeWithValue]
            package:dart-sdk/lib/async/future_impl.dart 556:7
<fn>
            package:dart-sdk/lib/_internal/js_dev_runtime/private/ddc_runtime/operations.dart 306:14
_checkAndCall
            package:dart-sdk/lib/_internal/js_dev_runtime/private/ddc_runtime/operations.dart 311:39
dcall
            package:quiver/testing/src/async/fake_async.dart 265:32
[_drainMicrotasks]
            package:quiver/testing/src/async/fake_async.dart 164:5
flushMicrotasks
            package:flutter_test/src/binding.dart 1099:16
<fn>
            package:dart-sdk/lib/_internal/js_dev_runtime/patch/async_patch.dart 86:54
runBody
            package:dart-sdk/lib/_internal/js_dev_runtime/patch/async_patch.dart 125:12
_async
            package:flutter_test/src/binding.dart 1087:35
<fn>
            package:dart-sdk/lib/async/future.dart 202:37
<fn>
            package:dart-sdk/lib/async/zone.dart 1180:38
_rootRun
            package:dart-sdk/lib/async/zone.dart 1077:19
run
            package:dart-sdk/lib/async/zone.dart 979:7
runGuarded
            package:dart-sdk/lib/async/zone.dart 1019:23
<fn>
            package:dart-sdk/lib/async/zone.dart 1184:13
_rootRun
            package:dart-sdk/lib/async/zone.dart 1077:19
run
            package:dart-sdk/lib/async/zone.dart 979:7
runGuarded
            package:dart-sdk/lib/async/zone.dart 1019:23
callback
            package:dart-sdk/lib/async/schedule_microtask.dart 43:11
_microtaskLoop
            package:dart-sdk/lib/async/schedule_microtask.dart 52:5
_startMicrotaskLoop
            package:dart-sdk/lib/_internal/js_dev_runtime/patch/async_patch.dart 168:15
<fn>
            (elided 7 frames from package:stack_trace)
          The complete display list was:
            * save()
            * drawPath(Path(Subpath(RRect.fromLTRBAndCorners(0.0, 0.0, 800.0, 56.0, topLeft:
Radius.circular(100.0), topRight: Radius.circular(200.0), bottomRight: Radius.circular(200.0),
bottomLeft: Radius.circular(100.0)))), Paint(Color(0xff00ff00)))
            * drawPath(Path(Subpath(Ellipse(14.215538847117793, 14.215538847117793,
13.715538847117793, 13.715538847117793)), Subpath(MoveTo(14.215538847117793, 0.5)),
Subpath(MoveTo(142.21553884711778, 0.5), LineTo(772, 0.5)), Subpath(Ellipse(772, 28, 27.5, 27.5)),
Subpath(MoveTo(799.5, 28), LineTo(799.5, 28)), Subpath(Ellipse(772, 28, 27.5, 27.5),
LineTo(14.215538847117793, 55.5)), Subpath(Ellipse(14.215538847117793, 41.78446115288221,
13.715538847117793, 13.715538847117793), LineTo(0.5, 14.215538847117793))),
Paint(PaintingStyle.stroke 1; Color(0x8a000000)))
            * restore()
When the exception was thrown, this was the stack:
package:dart-sdk/lib/_internal/js_dev_runtime/private/ddc_runtime/errors.dart 195:49      throw_
package:test_api/src/frontend/expect.dart 154:30                                          fail
package:test_api/src/frontend/expect.dart 148:3                                           _expect
package:test_api/src/frontend/expect.dart 60:3                                            expect$
package:flutter_test/src/widget_tester.dart 348:3                                         expect$
input_decorator_test.dart 3612:5                                                          <fn>
package:dart-sdk/lib/_internal/js_dev_runtime/patch/async_patch.dart 47:50                onValue
package:dart-sdk/lib/async/zone.dart 1192:38                                              _rootRunUnary
package:dart-sdk/lib/async/zone.dart 1085:19                                              runUnary
package:dart-sdk/lib/async/future_impl.dart 141:18                                        handleValue
package:dart-sdk/lib/async/future_impl.dart 682:44                                        handleValueCallback
package:dart-sdk/lib/async/future_impl.dart 711:32                                        _propagateToListeners
package:dart-sdk/lib/async/future_impl.dart 526:5                                         [_completeWithValue]
package:dart-sdk/lib/async/future_impl.dart 556:7                                         <fn>
package:dart-sdk/lib/_internal/js_dev_runtime/private/ddc_runtime/operations.dart 306:14  _checkAndCall
package:dart-sdk/lib/_internal/js_dev_runtime/private/ddc_runtime/operations.dart 311:39  dcall
package:quiver/testing/src/async/fake_async.dart 265:32                                   [_drainMicrotasks]
package:quiver/testing/src/async/fake_async.dart 164:5                                    flushMicrotasks
package:flutter_test/src/binding.dart 1099:16                                             <fn>
package:dart-sdk/lib/_internal/js_dev_runtime/patch/async_patch.dart 86:54                runBody
package:dart-sdk/lib/_internal/js_dev_runtime/patch/async_patch.dart 125:12               _async
package:flutter_test/src/binding.dart 1087:35                                             <fn>
package:dart-sdk/lib/async/future.dart 202:37                                             <fn>
package:dart-sdk/lib/async/zone.dart 1180:38                                              _rootRun
package:dart-sdk/lib/async/zone.dart 1077:19                                              run
package:dart-sdk/lib/async/zone.dart 979:7                                                runGuarded
package:dart-sdk/lib/async/zone.dart 1019:23                                              <fn>
package:dart-sdk/lib/async/zone.dart 1184:13                                              _rootRun
package:dart-sdk/lib/async/zone.dart 1077:19                                              run
package:dart-sdk/lib/async/zone.dart 979:7                                                runGuarded
package:dart-sdk/lib/async/zone.dart 1019:23                                              callback
package:dart-sdk/lib/async/schedule_microtask.dart 43:11                                  _microtaskLoop
package:dart-sdk/lib/async/schedule_microtask.dart 52:5                                   _startMicrotaskLoop
package:dart-sdk/lib/_internal/js_dev_runtime/patch/async_patch.dart 168:15               <fn>
(elided 7 frames from package:stack_trace)
The test description was:
  OutlineInputBorder borders scale down to fit when large values are passed in
════════════════════════════════════════════════════════════════════════════════════════════════════
04:21 +597 ~14 -2: /tmp/flutter sdk/packages/flutter/test/material/input_decorator_test.dart: OutlineInputBorder borders scale down to fit when large values are passed in [E]                         
  Test failed. See exception logs above.
  The test description was: OutlineInputBorder borders scale down to fit when large values are passed in

Activity

  1. added
    a: tests"flutter test", flutter_test, or one of our tests
    a: text inputEntering text in a text field or keyboard related problems
    frameworkflutter/packages/flutter repository. See also f: labels.
    p: material_uimaterial_ui package in flutter/packages
    platform-webWeb applications specifically
    c: contributor-productivityTeam-specific productivity, code health, technical debt.
    on Apr 21, 2020
  2. added this to the milestone on Apr 23, 2020
  3. added
    P1High-priority issues at the top of the work list
    on May 29, 2020
  4. added
    P2Important issues not at the top of the work list
    and removed
    P1High-priority issues at the top of the work list
    on Jun 16, 2020
  5. removed this from the milestone on Jul 7, 2020
  6. removed this from the milestone on Aug 17, 2020
  7. added
    packageflutter/packages repository. See also p: labels.
    and removed
    frameworkflutter/packages/flutter repository. See also f: labels.
    on Aug 17, 2026
  8. github-actions commented on Nov 4, 2026

    @github-actions

    This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.

  9. locked as resolved and limited conversation to collaborators on Nov 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Important issues not at the top of the work lista: tests"flutter test", flutter_test, or one of our testsa: text inputEntering text in a text field or keyboard related problemsc: contributor-productivityTeam-specific productivity, code health, technical debt.p: material_uimaterial_ui package in flutter/packagespackageflutter/packages repository. See also p: labels.platform-webWeb applications specificallyteam-webOwned by Web platform teamtriaged-webTriaged by Web platform team

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions