Repository: flutter
Issue: [Integration_test 2.5] tester.enterText is broken in release mode
Labels: c: regression,framework,f: integration_test,a: release,has reproducible steps,P2,found in release: 2.5,customer: dent,team-framework,triaged-framework

Since the Flutter 2.5 upgrade, `tester.enterText()` seems broken in my web integration tests in --release mode.
When I run `flutter drive` with `--no-headless`, I can see that no text is added in text fields.

## Steps to Reproduce

You can reproduce it with this repo https://github.com/rxlabz/text_drive 

```shell
sh drive_web.sh
sh drive_web_release.sh
```

You can also see the result of 3 GH actions workflows in the project : 
1. the first is running the integration_test without `--release` (https://github.com/rxlabz/text_drive/blob/master/.github/workflows/integration.yaml)  => it works ( all tests passed ) https://github.com/rxlabz/text_drive/actions/runs/1217290271
 
2. the other uses--release (https://github.com/rxlabz/text_drive/blob/master/.github/workflows/integration_release.yaml) and fails => https://github.com/rxlabz/text_drive/actions/runs/1217290268

3. the last one is running with flutter 2.2.3 in --release https://github.com/rxlabz/text_drive/actions/runs/1217434660/workflow => it works https://github.com/rxlabz/text_drive/runs/3556551737

<details>
  <summary>App</summary>

```dart
import 'package:flutter/material.dart';

void main() {
  runApp(const App());
}

class App extends StatelessWidget {
  const App({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) => const MaterialApp(home: MainScreen());
}

class MainScreen extends StatefulWidget {
  const MainScreen({Key? key}) : super(key: key);

  @override
  State<MainScreen> createState() => _MainScreenState();
}

class _MainScreenState extends State<MainScreen> {
  final TextEditingController controller = TextEditingController();

  String value = 'test';

  @override
  void initState() {
    super.initState();
    controller.addListener(() => setState(() => value = controller.text));
  }

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(),
      body: Center(
        child: Column(
          mainAxisSize: MainAxisSize.min,
          children: [
            TextFormField(key: const Key('field'), controller: controller),
            Text(value)
          ],
        ),
      ),
    );
  }
}

```
</details>

<details>
  <summary>integration test</summary>

```dart
import 'package:flutter/widgets.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:integration_test/integration_test.dart';
import 'package:text_drive/main.dart';

void main() {
  IntegrationTestWidgetsFlutterBinding.ensureInitialized();

  testWidgets("failing test example", (WidgetTester tester) async {
    await tester.pumpWidget(const App());

    final input = find.byKey(const Key('field'));
    expect(input, findsOneWidget);

    expect(find.text('test'), findsOneWidget);

    await tester.tap(input);
    await tester.enterText(input, 'Hello');

    // same result with `updateEditingValue`
    // (cf.https://flutter.dev/docs/release/breaking-changes/enterText-trailing-caret)
    // await tester.showKeyboard(input);
    // await tester.pumpAndSettle();
    //tester.testTextInput.updateEditingValue(
    //  const TextEditingValue(text: 'Hello'),
    //);

    await tester.pump();

    expect(find.text('Hello'), findsNWidgets(2));
  });
}
```
</details>