Repository: flutter
Issue: the pointer triggered by WidgetTester.longPress did not last as long as expected
Labels: a: tests,framework,dependency: dart,f: gestures,has reproducible steps,P3,found in release: 3.10,found in release: 3.12,team-framework,triaged-framework

### Is there an existing issue for this?

- [X] I have searched the [existing issues](https://github.com/flutter/flutter/issues)
- [X] I have read the [guide to filing a bug](https://flutter.dev/docs/resources/bug-reports)

### Steps to reproduce

use `flutter test` to run code example

### Expected results

`onPointerUpTime - onPointerDownTime` is equal to `(kLongPressTimeout + kPressTimeout).inMilliseconds`

### Actual results

`onPointerUpTime - onPointerDownTime` is around 45. However, expect duration is 600.

### Code sample

<details><summary>Code sample</summary>

```dart
import 'package:flutter/gestures.dart';
import 'package:flutter/material.dart';
import 'package:flutter_test/flutter_test.dart';

int get now => DateTime.now().millisecondsSinceEpoch;

int? onPointerDownTime;
int? onPointerUpTime;

void main() {
  testWidgets('Tap test', (WidgetTester tester) async {
    await tester.pumpWidget(Listener(
      key: const Key('listener'),
      onPointerDown: (event) {
        print('onPointerDown time: $now');
        onPointerDownTime = now;
      },
      onPointerUp: (_) {
        print('onPointerUp time: $now');
        onPointerUpTime = now;
      },
      child: const SizedBox(width: 100, height: 100, child: const ColoredBox(color: Colors.blue)),
    ));

    final listener = find.byKey(const Key('listener'));
    expect(listener, findsOneWidget);
    // Dispatch a pointer down / pointer up sequence (with a delay of
    // [kLongPressTimeout] + [kPressTimeout] between the two events)
    await tester.longPress(listener);
    await tester.pump();

    print('onPointerUpTime - onPointerDownTime: ${onPointerUpTime! - onPointerDownTime!}');
    final expectDuration = (kLongPressTimeout + kPressTimeout).inMilliseconds;
    print('expectDuration: $expectDuration');
    assert(onPointerUpTime! - onPointerDownTime! == expectDuration);
  });
}

```

</details>


### Screenshots or Video

_No response_

### Logs

_No response_

### Flutter Doctor output

<details><summary>Doctor output</summary>

```console
[✓] Flutter (Channel stable, 3.10.4, on macOS 13.4.1 22F82 darwin-arm64, locale en-JP)
    • Flutter version 3.10.4 on channel stable at /Users/xhz/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 682aa387cf (4 weeks ago), 2023-06-05 18:04:56 -0500
    • Engine revision 2a3401c9bb
    • Dart version 3.0.3
    • DevTools version 2.23.1
    • Pub download mirror https://mirrors.tuna.tsinghua.edu.cn/dart-pub

[✓] Android toolchain - develop for Android devices (Android SDK version 33.0.2)
    • Android SDK at /Users/xhz/Library/Android/sdk
    • Platform android-33, build-tools 33.0.2
    • ANDROID_HOME = /Users/xhz/Library/Android/sdk
    • Java binary at: /Users/xhz/Library/Application Support/JetBrains/Toolbox/apps/AndroidStudio/ch-0/222.4459.24.2221.9862592/Android
      Studio.app/Contents/jbr/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 17.0.6+0-17.0.6b802.4-9586694)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 14.3)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Build 14E222b
    • CocoaPods version 1.12.1

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 2022.2)
    • Android Studio at /Users/xhz/Library/Application Support/JetBrains/Toolbox/apps/AndroidStudio/ch-0/222.4459.24.2221.9862592/Android Studio.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 17.0.6+0-17.0.6b802.4-9586694)

[✓] IntelliJ IDEA Ultimate Edition (version 2023.1.3)
    • IntelliJ at /Users/xhz/Applications/JetBrains Toolbox/IntelliJ IDEA Ultimate.app
    • Flutter plugin version 74.0.4
    • Dart plugin version 231.9161.14

[✓] IntelliJ IDEA Ultimate Edition (version 2023.1.3)
    • IntelliJ at /Users/xhz/Library/Application Support/JetBrains/Toolbox/apps/IDEA-U/ch-0/231.9161.38/IntelliJ IDEA.app
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart

[✓] VS Code (version 1.79.2)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension can be installed from:
      🔨 https://marketplace.visualstudio.com/items?itemName=Dart-Code.flutter

[✓] Connected device (2 available)
    • macOS (desktop)           • macos                     • darwin-arm64   • macOS 13.4.1 22F82 darwin-arm64
    • Chrome (web)              • chrome                    • web-javascript • Google Chrome 114.0.5735.198
```

</details>