From 07e56d4893c661b696784427273dfdaca0b07e09 Mon Sep 17 00:00:00 2001 From: "Ming Lyu (CareF)" Date: Tue, 29 Sep 2020 20:27:03 -0400 Subject: [PATCH] fix smoothness (#66611) --- .../complex_layout/test/measure_scroll_smoothness.dart | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/dev/benchmarks/complex_layout/test/measure_scroll_smoothness.dart b/dev/benchmarks/complex_layout/test/measure_scroll_smoothness.dart index 0f733e39f3c..9372169e102 100644 --- a/dev/benchmarks/complex_layout/test/measure_scroll_smoothness.dart +++ b/dev/benchmarks/complex_layout/test/measure_scroll_smoothness.dart @@ -16,6 +16,16 @@ import 'package:e2e/e2e.dart'; import 'package:complex_layout/main.dart' as app; class PointerDataTestBinding extends E2EWidgetsFlutterBinding { + // PointerData injection would usually be considered device input and therefore + // blocked by [TestWidgetsFlutterBinding]. Override this behavior + // to help events go into widget tree. + @override + void handlePointerEvent( + PointerEvent event, { + TestBindingEventSource source = TestBindingEventSource.device, + }) { + super.handlePointerEvent(event, source: TestBindingEventSource.test); + } } /// A union of [ui.PointerDataPacket] and the time it should be sent.