Skip to content

[material_ui] Remove !chrome in text_field_test.dart - #12548

Merged
auto-submit[bot] merged 3 commits into
flutter:mainfrom
ValentinVignal:material-ui/test/remove-no-chrome-in-text-field-tests
Sep 1, 2026
Merged

[material_ui] Remove !chrome in text_field_test.dart#12548
auto-submit[bot] merged 3 commits into
flutter:mainfrom
ValentinVignal:material-ui/test/remove-no-chrome-in-text-field-tests

Conversation

@ValentinVignal

Copy link
Copy Markdown
Contributor

Part of flutter/flutter#92134

It seems the issue is already closed and fixed, so I'm attempting to remove this TODO

Pre-Review Checklist

If you need help, consider asking for advice on the #hackers-new channel on Discord.

Note: The Flutter team is currently trialing the use of Gemini Code Assist for GitHub. Comments from the gemini-code-assist bot should not be taken as authoritative feedback from the Flutter team. If you find its comments useful you can update your code accordingly, but if you are unsure or disagree with the feedback, please feel free to wait for a Flutter team member's review for guidance on which automated comments should be addressed.

Footnotes

  1. Regular contributors who have demonstrated familiarity with the repository guidelines only need to comment if the PR is not auto-exempted by repo tooling. 2

@flutter-dashboard flutter-dashboard Bot added the CICD Run CI/CD label Aug 22, 2026
@github-actions github-actions Bot added p: material_ui triage-design Should be looked at in design triage labels Aug 22, 2026

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request removes the @TestOn('!chrome') annotation and the associated TODO comment from packages/material_ui/test/text_field_test.dart, enabling the test suite to run on Chrome. There are no review comments, and I have no feedback to provide.

@elliette

Copy link
Copy Markdown
Member

It looks like one of the tests cases is failing on web:

11:47 +3359 ~106: test/text_field_test.dart: text field build empty toolbar when no options available (variant: TargetPlatform.android)
[BROWSER CONSOLE] [error]: ══╡ EXCEPTION CAUGHT BY FLUTTER TEST FRAMEWORK ╞════════════════════════════════════════════════════
The following TestFailure was thrown running a test:
Expected: exactly one matching candidate
  Actual: _TypeWidgetFinder:<Found 0 widgets with type "AdaptiveTextSelectionToolbar": []>
   Which: means none were found but one was expected

When the exception was thrown, this was the stack:
dart-sdk/lib/_internal/js_dev_runtime/private/ddc_runtime/errors.dart 274:3       throw_
package:matcher/src/expect/expect.dart 187:31                                     fail
package:matcher/src/expect/expect.dart 182:3                                      _expect
package:matcher/src/expect/expect.dart 65:3                                       expect$
package:flutter_test/src/widget_tester.dart 473:18                                expect$
text_field_test.dart 2118:7                                                       <fn>
dart-sdk/lib/_internal/js_dev_runtime/patch/async_patch.dart 618:19               <fn>
dart-sdk/lib/_internal/js_dev_runtime/patch/async_patch.dart 643:23               <fn>
dart-sdk/lib/_internal/js_dev_runtime/patch/async_patch.dart 589:19               <fn>
dart-sdk/lib/async/zone.dart 843:24                                               [_runUnaryZoned]
dart-sdk/lib/async/future_impl.dart 222:18                                        handleValue
dart-sdk/lib/async/future_impl.dart 961:44                                        handleValueCallback
dart-sdk/lib/async/future_impl.dart 990:13                                        _propagateToListeners
dart-sdk/lib/async/future_impl.dart 732:5                                         [_completeWithValue]
dart-sdk/lib/async/future_impl.dart 816:7                                         <fn>
dart-sdk/lib/async/zone.dart 824:24                                               [_runZoned]
dart-sdk/lib/async/zone.dart 474:14                                               runGuarded
package:fake_async/fake_async.dart 189:17                                         <fn>
package:fake_async/fake_async.dart 200:19                                         flushMicrotasks
package:flutter_test/src/binding.dart 2532:16                                     <fn>
dart-sdk/lib/_internal/js_dev_runtime/patch/async_patch.dart 618:19               <fn>
dart-sdk/lib/_internal/js_dev_runtime/patch/async_patch.dart 643:23               <fn>
dart-sdk/lib/_internal/js_dev_runtime/patch/async_patch.dart 537:3                _asyncStartSync
package:flutter_test/src/binding.dart 2537:7                                      <fn>
dart-sdk/lib/async/future.dart 287:40                                             <fn>
dart-sdk/lib/async/zone.dart 819:24                                               [_runZoned]
dart-sdk/lib/async/zone.dart 474:14                                               runGuarded
dart-sdk/lib/async/zone.dart 604:18                                               <fn>
dart-sdk/lib/async/zone.dart 824:24                                               [_runZoned]
dart-sdk/lib/async/zone.dart 474:14                                               runGuarded
dart-sdk/lib/async/zone.dart 604:18                                               <fn>
dart-sdk/lib/async/schedule_microtask.dart 40:34                                  _microtaskLoop
dart-sdk/lib/async/schedule_microtask.dart 49:5                                   _startMicrotaskLoop
dart-sdk/lib/_internal/js_dev_runtime/private/ddc_runtime/operations.dart 118:77  tear
dart-sdk/lib/_internal/js_dev_runtime/patch/async_patch.dart 183:69               <fn>
(elided 10 frames from package:stack_trace)

The test description was:
  text field build empty toolbar when no options available (variant: TargetPlatform.android)

@ValentinVignal
ValentinVignal force-pushed the material-ui/test/remove-no-chrome-in-text-field-tests branch from 6efac2c to 1392c8a Compare August 26, 2026 09:30
@ValentinVignal

Copy link
Copy Markdown
Contributor Author

I had to add few skip, let me know if they don't make sense

TargetPlatform.linux,
TargetPlatform.windows,
}),
skip: isContextMenuProvidedByPlatform,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think skipping these tests when isContextMenuProvidedByPlatform is valid.

TargetPlatform.linux,
TargetPlatform.windows,
}),
skip: isContextMenuProvidedByPlatform,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: Can we add a comment above this line to mention it is intended, like

// [intended] only applies to platforms where we supply the context menu.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, I added comments in Add comments

// Regression test for https://github.com/flutter/flutter/issues/168578.
final controller = TextEditingController(text: 'abc def ghi');
addTearDown(controller.dispose);
testWidgets(

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems these are only format changes. Can we revert them?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Those formatting changes are because I added a skip: kIsWeb at the end. Is there a way to add it without having those formatting changes?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see. I think it's fine.

@QuncCccccc QuncCccccc left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thank you!

// Regression test for https://github.com/flutter/flutter/issues/168578.
final controller = TextEditingController(text: 'abc def ghi');
addTearDown(controller.dispose);
testWidgets(

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see. I think it's fine.

@elliette elliette left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you, looks good!

@elliette

Copy link
Copy Markdown
Member

Re-running the timed out tests to deflake (I don't think they are related to this change)

@ValentinVignal
ValentinVignal force-pushed the material-ui/test/remove-no-chrome-in-text-field-tests branch from a2fa596 to 1358242 Compare September 1, 2026 06:24
@elliette elliette added the autosubmit Merge PR when tree becomes green via auto submit App label Sep 1, 2026
@auto-submit
auto-submit Bot merged commit e8889d8 into flutter:main Sep 1, 2026
13 checks passed
pull Bot pushed a commit to Mu-L/flutter that referenced this pull request Sep 2, 2026
…r#192191)

flutter/packages@7a7912f...18fe786

2026-09-02 32538273+ValentinVignal@users.noreply.github.com
[path_parsing] Fix deprecation lints (flutter/packages#12704)
2026-09-02 srawlins@google.com [material_ui] Use super parameters in
more places (flutter/packages#12460)
2026-09-02 21270878+elliette@users.noreply.github.com [material_ui] Add
a README and placeholders for migrating gen_defaults templates
(flutter/packages#12714)
2026-09-01 victor.orozco@cloudsufi.com [image_picker] Add native tests
for image, metadata, photo-asset, and PHPicker save utilities
(flutter/packages#12536)
2026-09-01 lozhkovoi@gmail.com [material_ui] Port routes_transition_test
to material_ui (flutter/packages#12634)
2026-09-01 engine-flutter-autoroll@skia.org Roll Flutter from
c8c5e3b to 0cbd1a4 (23 revisions) (flutter/packages#12712)
2026-09-01 32538273+ValentinVignal@users.noreply.github.com
[material_ui] Remove !chrome in text_field_test.dart
(flutter/packages#12548)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-packages-flutter-autoroll
Please CC flutter-ecosystem@google.com on the revert to ensure that a
human
is aware of the problem.

To file a bug in Flutter:
https://github.com/flutter/flutter/issues/new/choose

To report a problem with the AutoRoller itself, please file a bug:
https://issues.skia.org/issues/new?component=1389291&template=1850622

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

autosubmit Merge PR when tree becomes green via auto submit App CICD Run CI/CD p: material_ui triage-design Should be looked at in design triage

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants