Repository: flutter/flutter
File: packages/flutter/test/widgets/selectable_region_test.dart (Dart)

Code before:
          ),
        ),
      ),
    );
    final RenderParagraph paragraph1 = tester.renderObject<RenderParagraph>(
      find.descendant(of: find.byKey(outerText), matching: find.byType(RichText)).first,
    );
    final TestGesture gesture = await tester.startGesture(
      textOffsetToPosition(paragraph1, 0),
      kind: PointerDeviceKind.mouse,
    );
    addTearDown(gesture.removePointer);
    await tester.pump();
    await gesture.up();

    // Select all.
    await sendKeyCombination(tester, const SingleActivator(LogicalKeyboardKey.keyA, control: true));

    // keyboard copy.
    await sendKeyCombination(tester, const SingleActivator(LogicalKeyboardKey.keyC, control: true));

    final clipboardData = mockClipboard.clipboardData as Map<String, dynamic>;
    expect(clipboardData['text'], 'Hello my name is Dash.');
  });

  // Regression test for https://github.com/flutter/flutter/issues/174246 .
  testWidgets('SelectableRegion applies correct mouse cursors in its empty region', (
    WidgetTester tester,
  ) async {
    final GlobalKey innerRegion = GlobalKey();
    await tester.pumpWidget(
      TestWidgetsApp(
        // Region 1 (fullscreen)
        home: MouseRegion(
          cursor: SystemMouseCursors.grab,
          child: Center(
            child: Container(
              decoration: BoxDecoration(border: Border.all()),
              // Region 2 (SelectableRegion)
              child: SelectableRegion(
                selectionControls: emptyTextSelectionControls,
                child: Padding(
                  padding: const EdgeInsets.all(40),
                  // Region 3 (inner MouseRegion)
                  child: MouseRegion(
                    key: innerRegion,
                    cursor: SystemMouseCursors.forbidden,
                    onHover: (_) {},
                    child: Container(color: const Color(0xFFAA9933), width: 200, height: 50),
                  ),
                ),

Review comment (suggestion):
```suggestion
  // Regression test for https://github.com/flutter/flutter/issues/174246
```

Code after:
          ),
        ),
      ),
    );
    final RenderParagraph paragraph1 = tester.renderObject<RenderParagraph>(
      find.descendant(of: find.byKey(outerText), matching: find.byType(RichText)).first,
    );
    final TestGesture gesture = await tester.startGesture(
      textOffsetToPosition(paragraph1, 0),
      kind: PointerDeviceKind.mouse,
    );
    addTearDown(gesture.removePointer);
    await tester.pump();
    await gesture.up();

    // Select all.
    await sendKeyCombination(tester, const SingleActivator(LogicalKeyboardKey.keyA, control: true));

    // keyboard copy.
    await sendKeyCombination(tester, const SingleActivator(LogicalKeyboardKey.keyC, control: true));

    final clipboardData = mockClipboard.clipboardData as Map<String, dynamic>;
    expect(clipboardData['text'], 'Hello my name is Dash.');
  });

  // Regression test for https://github.com/flutter/flutter/issues/174246
  testWidgets('SelectableRegion applies correct mouse cursors in its empty region', (
    WidgetTester tester,
  ) async {
    final GlobalKey innerRegion = GlobalKey();
    await tester.pumpWidget(
      TestWidgetsApp(
        // Region 1 (fullscreen)
        home: MouseRegion(
          cursor: SystemMouseCursors.grab,
          child: Center(
            child: Container(
              decoration: BoxDecoration(border: Border.all()),
              // Region 2 (SelectableRegion)
              child: SelectableRegion(
                selectionControls: emptyTextSelectionControls,
                child: Padding(
                  padding: const EdgeInsets.all(40),
                  // Region 3 (inner MouseRegion)
                  child: MouseRegion(
                    key: innerRegion,
                    cursor: SystemMouseCursors.forbidden,
                    onHover: (_) {},
                    child: Container(color: const Color(0xFFAA9933), width: 200, height: 50),
                  ),
                ),