mirror of
https://github.com/flutter/flutter.git
synced 2025-06-03 00:51:18 +00:00
Updates flutter/test/gestures
to no longer reference TestWindow
(#122327)
Updates `flutter/test/gestures` to no longer reference `TestWindow`
This commit is contained in:
parent
67e17e45f0
commit
c2a5111cc0
@ -90,7 +90,9 @@ class NestedDraggableCase extends StatelessWidget {
|
||||
|
||||
void main() {
|
||||
testWidgets('Scroll Views get the same ScrollConfiguration as GestureDetectors', (WidgetTester tester) async {
|
||||
tester.binding.window.gestureSettingsTestValue = const ui.GestureSettings(physicalTouchSlop: 4);
|
||||
tester.view.gestureSettings = const ui.GestureSettings(physicalTouchSlop: 4);
|
||||
addTearDown(tester.view.reset);
|
||||
|
||||
final TestResult result = TestResult();
|
||||
|
||||
await tester.pumpWidget(MaterialApp(
|
||||
@ -108,11 +110,11 @@ void main() {
|
||||
|
||||
expect(result.dragStarted, true);
|
||||
expect(result.dragUpdate, true);
|
||||
tester.binding.window.clearGestureSettingsTestValue();
|
||||
});
|
||||
|
||||
testWidgets('Scroll Views get the same ScrollConfiguration as Draggables', (WidgetTester tester) async {
|
||||
tester.binding.window.gestureSettingsTestValue = const ui.GestureSettings(physicalTouchSlop: 4);
|
||||
tester.view.gestureSettings = const ui.GestureSettings(physicalTouchSlop: 4);
|
||||
addTearDown(tester.view.reset);
|
||||
|
||||
final TestResult result = TestResult();
|
||||
|
||||
@ -131,6 +133,5 @@ void main() {
|
||||
|
||||
expect(result.dragStarted, true);
|
||||
expect(result.dragUpdate, true);
|
||||
tester.binding.window.clearGestureSettingsTestValue();
|
||||
});
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user